Skip to content

Commit

Permalink
Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>.
Browse files Browse the repository at this point in the history
BUG=423621

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

Cr-Commit-Position: refs/heads/master@{#300030}
  • Loading branch information
zetafunction authored and Commit bot committed Oct 17, 2014
1 parent d355b34 commit ecc340f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions ipc/ipc_channel_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions ipc/mojo/ipc_channel_mojo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ecc340f

Please sign in to comment.