diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 21:10:32 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 21:10:32 +0000 |
commit | cfa4e4bc94157b66e59d02c721387323a06b2af3 (patch) | |
tree | 9550cbf374c1e0249dcde903f5009b22a056c7b7 /ipc/ipc_send_fds_test.cc | |
parent | 4db51ec6941bfbad574f812730206b5519bbe7c4 (diff) | |
download | chromium_src-cfa4e4bc94157b66e59d02c721387323a06b2af3.zip chromium_src-cfa4e4bc94157b66e59d02c721387323a06b2af3.tar.gz chromium_src-cfa4e4bc94157b66e59d02c721387323a06b2af3.tar.bz2 |
Revert 273575 "Introduce IPC::Channel::Create*() to ensure it be..."
Broke win compile.
> Introduce IPC::Channel::Create*() to ensure it being heap-allocated.
>
> This change introduces IPC::Channel::Create*() API to turn
> IPC::Channel into a heap allocated object. This will allow us to
> make Channel a polymorphic class.
>
> This change also tries to hide Channel::Mode from public API
> so that we can simplify channel creation code paths cleaner in
> following changes. ChannelProxy has to follow same pattern to
> finish this cleanup. Such changes will follow.
>
> TEST=none
> BUG=377980
> R=darin@chromium.org,cpu@chromium.org
>
> Review URL: https://codereview.chromium.org/307653003
TBR=morrita@chromium.org
Review URL: https://codereview.chromium.org/304153005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_send_fds_test.cc')
-rw-r--r-- | ipc/ipc_send_fds_test.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc index 7e6a4e4..aeec890 100644 --- a/ipc/ipc_send_fds_test.cc +++ b/ipc/ipc_send_fds_test.cc @@ -134,10 +134,10 @@ int SendFdsClientCommon(const std::string& test_client_name, MyChannelDescriptorListener listener(expected_inode_num); // Set up IPC channel. - scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient( - IPCTestBase::GetChannelName(test_client_name), - &listener)); - CHECK(channel->Connect()); + IPC::Channel channel(IPCTestBase::GetChannelName(test_client_name), + IPC::Channel::MODE_CLIENT, + &listener); + CHECK(channel.Connect()); // Run message loop. base::MessageLoop::current()->Run(); @@ -233,10 +233,14 @@ class PipeChannelHelper { void Init() { IPC::ChannelHandle in_handle("IN"); - in = IPC::Channel::CreateServer(in_handle, &null_listener_); + in.reset(new IPC::Channel(in_handle, + IPC::Channel::MODE_SERVER, + &null_listener_)); base::FileDescriptor out_fd(in->TakeClientFileDescriptor(), false); IPC::ChannelHandle out_handle("OUT", out_fd); - out = IPC::Channel::CreateClient(out_handle, &cb_listener_); + out.reset(new IPC::Channel(out_handle, + IPC::Channel::MODE_CLIENT, + &cb_listener_)); // PostTask the connect calls to make sure the callbacks happens // on the right threads. in_thread_->message_loop()->PostTask( |