From 3909aa922a9e3c966de47ba2dde76c3a11596b43 Mon Sep 17 00:00:00 2001 From: "morrita@chromium.org" Date: Thu, 29 May 2014 20:30:17 +0000 Subject: 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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273575 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_channel_proxy_unittest.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ipc/ipc_channel_proxy_unittest.cc') diff --git a/ipc/ipc_channel_proxy_unittest.cc b/ipc/ipc_channel_proxy_unittest.cc index bd2381c..20e42e3 100644 --- a/ipc/ipc_channel_proxy_unittest.cc +++ b/ipc/ipc_channel_proxy_unittest.cc @@ -428,11 +428,11 @@ TEST_F(IPCChannelBadMessageTest, BadMessage) { MULTIPROCESS_IPC_TEST_CLIENT_MAIN(ChannelProxyClient) { base::MessageLoopForIO main_message_loop; ChannelReflectorListener listener; - IPC::Channel channel(IPCTestBase::GetChannelName("ChannelProxyClient"), - IPC::Channel::MODE_CLIENT, - &listener); - CHECK(channel.Connect()); - listener.Init(&channel); + scoped_ptr channel(IPC::Channel::CreateClient( + IPCTestBase::GetChannelName("ChannelProxyClient"), + &listener)); + CHECK(channel->Connect()); + listener.Init(channel.get()); base::MessageLoop::current()->Run(); return 0; -- cgit v1.1