Commit b2ea4647 authored by viettrungluu's avatar viettrungluu Committed by Commit bot

Revert of Revert of Mojo: Convert some scoped_ptr<...>(new ...) to...

Revert of Revert of Mojo: Convert some scoped_ptr<...>(new ...) to make_scoped_ptr(new ...) in mojo/{embedder,system}. (patchset #1 id:1 of https://codereview.chromium.org/609033002/)

Reason for revert:
scoped_ptr nullptr support was un-reverted.

Original issue's description:
> Revert of Mojo: Convert some scoped_ptr<...>(new ...) to make_scoped_ptr(new ...) in mojo/{embedder,system}. (patchset #2 id:20001 of https://codereview.chromium.org/610083002/)
>
> Reason for revert:
> scoped_ptr nullptr support was reverted.
>
> Original issue's description:
> > Mojo: Convert some scoped_ptr<...>(new ...) to make_scoped_ptr(new ...) in mojo/{embedder,system}.
> >
> > R=jamesr@chromium.org
> >
> > Committed: https://crrev.com/a60566701028a7344d17826076780eeb84b63052
> > Cr-Commit-Position: refs/heads/master@{#297095}
>
> TBR=jamesr@chromium.org,viettrungluu@chromium.org
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://crrev.com/3f8f6ea2347da4437dfd56b567c7daddfb9d8940
> Cr-Commit-Position: refs/heads/master@{#297108}

TBR=jamesr@chromium.org,dcheng@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/613673004

Cr-Commit-Position: refs/heads/master@{#297192}
parent b6a9b4d4
......@@ -141,9 +141,8 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl(
}
void* base = static_cast<char*>(real_base) + offset_rounding;
return scoped_ptr<PlatformSharedBufferMapping>(
new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length));
return make_scoped_ptr(new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length));
}
// SimplePlatformSharedBufferMapping -------------------------------------------
......
......@@ -79,9 +79,8 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl(
}
void* base = static_cast<char*>(real_base) + offset_rounding;
return scoped_ptr<PlatformSharedBufferMapping>(
new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length));
return make_scoped_ptr(new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length));
}
// SimplePlatformSharedBufferMapping -------------------------------------------
......
......@@ -42,7 +42,7 @@ namespace embedder {
namespace test {
void InitWithSimplePlatformSupport() {
Init(scoped_ptr<PlatformSupport>(new SimplePlatformSupport()));
Init(make_scoped_ptr(new SimplePlatformSupport()));
}
bool Shutdown() {
......
......@@ -175,8 +175,7 @@ CoreTestBase::~CoreTestBase() {
}
void CoreTestBase::SetUp() {
core_ = new Core(scoped_ptr<embedder::PlatformSupport>(
new embedder::SimplePlatformSupport()));
core_ = new Core(make_scoped_ptr(new embedder::SimplePlatformSupport()));
}
void CoreTestBase::TearDown() {
......
......@@ -479,7 +479,7 @@ void RawChannelPosix::WaitToWrite() {
// static
scoped_ptr<RawChannel> RawChannel::Create(
embedder::ScopedPlatformHandle handle) {
return scoped_ptr<RawChannel>(new RawChannelPosix(handle.Pass()));
return make_scoped_ptr(new RawChannelPosix(handle.Pass()));
}
} // namespace system
......
......@@ -573,7 +573,7 @@ void RawChannelWin::OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
// static
scoped_ptr<RawChannel> RawChannel::Create(
embedder::ScopedPlatformHandle handle) {
return scoped_ptr<RawChannel>(new RawChannelWin(handle.Pass()));
return make_scoped_ptr(new RawChannelWin(handle.Pass()));
}
} // namespace system
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment