Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: ipc/ipc_send_fds_test.cc

Issue 307653003: Introduce IPC::Channel::Create*() to ensure it being heap-allocated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build, landing again. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc_perftests.cc ('k') | ipc/ipc_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_send_fds_test.cc
diff --git a/ipc/ipc_send_fds_test.cc b/ipc/ipc_send_fds_test.cc
index aeec8907a4f803b492c9759a90b75a8337e741c1..7e6a4e41e4622d9a6bd75d082b23c7a22dee01cc 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.
- IPC::Channel channel(IPCTestBase::GetChannelName(test_client_name),
- IPC::Channel::MODE_CLIENT,
- &listener);
- CHECK(channel.Connect());
+ scoped_ptr<IPC::Channel> channel(IPC::Channel::CreateClient(
+ IPCTestBase::GetChannelName(test_client_name),
+ &listener));
+ CHECK(channel->Connect());
// Run message loop.
base::MessageLoop::current()->Run();
@@ -233,14 +233,10 @@ class PipeChannelHelper {
void Init() {
IPC::ChannelHandle in_handle("IN");
- in.reset(new IPC::Channel(in_handle,
- IPC::Channel::MODE_SERVER,
- &null_listener_));
+ in = IPC::Channel::CreateServer(in_handle, &null_listener_);
base::FileDescriptor out_fd(in->TakeClientFileDescriptor(), false);
IPC::ChannelHandle out_handle("OUT", out_fd);
- out.reset(new IPC::Channel(out_handle,
- IPC::Channel::MODE_CLIENT,
- &cb_listener_));
+ out = IPC::Channel::CreateClient(out_handle, &cb_listener_);
// PostTask the connect calls to make sure the callbacks happens
// on the right threads.
in_thread_->message_loop()->PostTask(
« no previous file with comments | « ipc/ipc_perftests.cc ('k') | ipc/ipc_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698