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,8 +141,7 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl( ...@@ -141,8 +141,7 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl(
} }
void* base = static_cast<char*>(real_base) + offset_rounding; void* base = static_cast<char*>(real_base) + offset_rounding;
return scoped_ptr<PlatformSharedBufferMapping>( return make_scoped_ptr(new SimplePlatformSharedBufferMapping(
new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length)); base, length, real_base, real_length));
} }
......
...@@ -79,8 +79,7 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl( ...@@ -79,8 +79,7 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl(
} }
void* base = static_cast<char*>(real_base) + offset_rounding; void* base = static_cast<char*>(real_base) + offset_rounding;
return scoped_ptr<PlatformSharedBufferMapping>( return make_scoped_ptr(new SimplePlatformSharedBufferMapping(
new SimplePlatformSharedBufferMapping(
base, length, real_base, real_length)); base, length, real_base, real_length));
} }
......
...@@ -42,7 +42,7 @@ namespace embedder { ...@@ -42,7 +42,7 @@ namespace embedder {
namespace test { namespace test {
void InitWithSimplePlatformSupport() { void InitWithSimplePlatformSupport() {
Init(scoped_ptr<PlatformSupport>(new SimplePlatformSupport())); Init(make_scoped_ptr(new SimplePlatformSupport()));
} }
bool Shutdown() { bool Shutdown() {
......
...@@ -175,8 +175,7 @@ CoreTestBase::~CoreTestBase() { ...@@ -175,8 +175,7 @@ CoreTestBase::~CoreTestBase() {
} }
void CoreTestBase::SetUp() { void CoreTestBase::SetUp() {
core_ = new Core(scoped_ptr<embedder::PlatformSupport>( core_ = new Core(make_scoped_ptr(new embedder::SimplePlatformSupport()));
new embedder::SimplePlatformSupport()));
} }
void CoreTestBase::TearDown() { void CoreTestBase::TearDown() {
......
...@@ -479,7 +479,7 @@ void RawChannelPosix::WaitToWrite() { ...@@ -479,7 +479,7 @@ void RawChannelPosix::WaitToWrite() {
// static // static
scoped_ptr<RawChannel> RawChannel::Create( scoped_ptr<RawChannel> RawChannel::Create(
embedder::ScopedPlatformHandle handle) { embedder::ScopedPlatformHandle handle) {
return scoped_ptr<RawChannel>(new RawChannelPosix(handle.Pass())); return make_scoped_ptr(new RawChannelPosix(handle.Pass()));
} }
} // namespace system } // namespace system
......
...@@ -573,7 +573,7 @@ void RawChannelWin::OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer, ...@@ -573,7 +573,7 @@ void RawChannelWin::OnShutdownNoLock(scoped_ptr<ReadBuffer> read_buffer,
// static // static
scoped_ptr<RawChannel> RawChannel::Create( scoped_ptr<RawChannel> RawChannel::Create(
embedder::ScopedPlatformHandle handle) { embedder::ScopedPlatformHandle handle) {
return scoped_ptr<RawChannel>(new RawChannelWin(handle.Pass())); return make_scoped_ptr(new RawChannelWin(handle.Pass()));
} }
} // namespace system } // 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