Index: ipc/ipc_channel_proxy.cc |
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc |
index e88bb5d0e72abd0e508fb4b1c1fc96833e6d9699..ceffb9474c47290cc11c4590cf1f680d8bc70fa6 100644 |
--- a/ipc/ipc_channel_proxy.cc |
+++ b/ipc/ipc_channel_proxy.cc |
@@ -304,13 +304,15 @@ void ChannelProxy::Context::OnDispatchBadMessage(const Message& message) { |
//----------------------------------------------------------------------------- |
-ChannelProxy::ChannelProxy(const IPC::ChannelHandle& channel_handle, |
- Channel::Mode mode, |
- Listener* listener, |
- base::SingleThreadTaskRunner* ipc_task_runner) |
- : context_(new Context(listener, ipc_task_runner)), |
- did_init_(false) { |
- Init(channel_handle, mode, true); |
+// static |
+scoped_ptr<ChannelProxy> ChannelProxy::Create( |
+ const IPC::ChannelHandle& channel_handle, |
+ Channel::Mode mode, |
+ Listener* listener, |
+ base::SingleThreadTaskRunner* ipc_task_runner) { |
+ scoped_ptr<ChannelProxy> channel(new ChannelProxy(listener, ipc_task_runner)); |
+ channel->Init(channel_handle, mode, true); |
+ return channel.Pass(); |
} |
ChannelProxy::ChannelProxy(Context* context) |
@@ -318,6 +320,11 @@ ChannelProxy::ChannelProxy(Context* context) |
did_init_(false) { |
} |
+ChannelProxy::ChannelProxy(Listener* listener, |
+ base::SingleThreadTaskRunner* ipc_task_runner) |
+ : context_(new Context(listener, ipc_task_runner)), did_init_(false) { |
+} |
+ |
ChannelProxy::~ChannelProxy() { |
DCHECK(CalledOnValidThread()); |