| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index 37f598e521c1231ca1408972718372f658563d66..90c91b82aa7b2db3b5a904fd4a9c7de94351d301 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -726,11 +726,6 @@ bool RenderProcessHostImpl::Init() {
|
| const std::string channel_id =
|
| IPC::Channel::GenerateVerifiedChannelID(std::string());
|
| channel_ = CreateChannelProxy(channel_id);
|
| -#if USE_ATTACHMENT_BROKER
|
| - IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
|
| - channel_.get(), content::BrowserThread::GetMessageLoopProxyForThread(
|
| - content::BrowserThread::IO));
|
| -#endif
|
|
|
| // Setup the Mojo channel.
|
| mojo_application_host_->Init();
|
| @@ -837,9 +832,15 @@ scoped_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
|
| }
|
| #endif // OS_ANDROID
|
|
|
| - return IPC::ChannelProxy::Create(
|
| - IPC::ChannelMojo::CreateServerFactory(std::move(handle)), this,
|
| - runner.get());
|
| + std::unique_ptr<IPC::ChannelProxy> channel(
|
| + new IPC::ChannelProxy(this, runner.get()));
|
| +#if USE_ATTACHMENT_BROKER
|
| + IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
|
| + channel.get(), content::BrowserThread::GetMessageLoopProxyForThread(
|
| + content::BrowserThread::IO));
|
| +#endif
|
| + channel->Init(IPC::ChannelMojo::CreateServerFactory(std::move(handle)), true);
|
| + return channel;
|
| }
|
|
|
| // Do NOT expand ifdef or run time condition checks here! See comment above.
|
| @@ -851,8 +852,15 @@ scoped_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
|
| }
|
| #endif // OS_ANDROID
|
|
|
| - return IPC::ChannelProxy::Create(channel_id, IPC::Channel::MODE_SERVER, this,
|
| - runner.get());
|
| + std::unique_ptr<IPC::ChannelProxy> channel(
|
| + new IPC::ChannelProxy(this, runner.get()));
|
| +#if USE_ATTACHMENT_BROKER
|
| + IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
|
| + channel.get(), content::BrowserThread::GetMessageLoopProxyForThread(
|
| + content::BrowserThread::IO));
|
| +#endif
|
| + channel->Init(channel_id, IPC::Channel::MODE_SERVER, true);
|
| + return channel;
|
| }
|
|
|
| void RenderProcessHostImpl::CreateMessageFilters() {
|
|
|