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