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(
}
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