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

Mojo: Convert some scoped_ptr<...>(new ...) to make_scoped_ptr(new ...) in mojo/{embedder,system}.

R=jamesr@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#297095}
parent 2a49d598
...@@ -141,9 +141,8 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl( ...@@ -141,9 +141,8 @@ 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));
} }
// SimplePlatformSharedBufferMapping ------------------------------------------- // SimplePlatformSharedBufferMapping -------------------------------------------
......
...@@ -79,9 +79,8 @@ scoped_ptr<PlatformSharedBufferMapping> SimplePlatformSharedBuffer::MapImpl( ...@@ -79,9 +79,8 @@ 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));
} }
// SimplePlatformSharedBufferMapping ------------------------------------------- // SimplePlatformSharedBufferMapping -------------------------------------------
......
...@@ -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