Commit ecc340fd authored by dcheng's avatar dcheng Committed by Commit bot

Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>.

BUG=423621

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

Cr-Commit-Position: refs/heads/master@{#300030}
parent d355b341
...@@ -1054,8 +1054,7 @@ base::ProcessId ChannelPosix::GetSelfPID() const { ...@@ -1054,8 +1054,7 @@ base::ProcessId ChannelPosix::GetSelfPID() const {
// static // static
scoped_ptr<Channel> Channel::Create( scoped_ptr<Channel> Channel::Create(
const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) { const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener) {
return make_scoped_ptr(new ChannelPosix( return make_scoped_ptr(new ChannelPosix(channel_handle, mode, listener));
channel_handle, mode, listener)).PassAs<Channel>();
} }
// static // static
......
...@@ -32,8 +32,7 @@ class MojoChannelFactory : public ChannelFactory { ...@@ -32,8 +32,7 @@ class MojoChannelFactory : public ChannelFactory {
} }
virtual scoped_ptr<Channel> BuildChannel(Listener* listener) override { virtual scoped_ptr<Channel> BuildChannel(Listener* listener) override {
return ChannelMojo::Create(delegate_, channel_handle_, mode_, listener) return ChannelMojo::Create(delegate_, channel_handle_, mode_, listener);
.PassAs<Channel>();
} }
private: private:
...@@ -66,17 +65,15 @@ scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate, ...@@ -66,17 +65,15 @@ scoped_ptr<ChannelMojo> ChannelMojo::Create(ChannelMojo::Delegate* delegate,
scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory( scoped_ptr<ChannelFactory> ChannelMojo::CreateServerFactory(
ChannelMojo::Delegate* delegate, ChannelMojo::Delegate* delegate,
const ChannelHandle& channel_handle) { const ChannelHandle& channel_handle) {
return make_scoped_ptr(new MojoChannelFactory( return make_scoped_ptr(
delegate, channel_handle, Channel::MODE_SERVER)) new MojoChannelFactory(delegate, channel_handle, Channel::MODE_SERVER));
.PassAs<ChannelFactory>();
} }
// static // static
scoped_ptr<ChannelFactory> ChannelMojo::CreateClientFactory( scoped_ptr<ChannelFactory> ChannelMojo::CreateClientFactory(
const ChannelHandle& channel_handle) { const ChannelHandle& channel_handle) {
return make_scoped_ptr( return make_scoped_ptr(
new MojoChannelFactory(NULL, channel_handle, Channel::MODE_CLIENT)) new MojoChannelFactory(NULL, channel_handle, Channel::MODE_CLIENT));
.PassAs<ChannelFactory>();
} }
ChannelMojo::ChannelMojo(ChannelMojo::Delegate* delegate, ChannelMojo::ChannelMojo(ChannelMojo::Delegate* delegate,
......
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