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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2159293002: Plumb explicit IPC task runner through to IPC::Channel creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add dcheck Created 4 years, 5 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 | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f427078571907ad29f7c5d8cfa6224ff030b70f1..97e913838ead25e2e77d12192f0a9e81ebd9865a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -841,6 +841,9 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
mojo::ScopedMessagePipeHandle handle =
mojo::edk::CreateParentMessagePipe(mojo_channel_token_, child_token_);
+ std::unique_ptr<IPC::ChannelFactory> channel_factory =
+ IPC::ChannelMojo::CreateServerFactory(std::move(handle), runner);
+
// Do NOT expand ifdef or run time condition checks here! Synchronous
// IPCs from browser process are banned. It is only narrowly allowed
// for Android WebView to maintain backward compatibility.
@@ -848,8 +851,7 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
#if defined(OS_ANDROID)
if (GetContentClient()->UsingSynchronousCompositing()) {
return IPC::SyncChannel::Create(
- IPC::ChannelMojo::CreateServerFactory(std::move(handle)), this,
- runner.get(), true, &never_signaled_);
+ std::move(channel_factory), this, runner.get(), true, &never_signaled_);
}
#endif // OS_ANDROID
@@ -857,10 +859,9 @@ std::unique_ptr<IPC::ChannelProxy> RenderProcessHostImpl::CreateChannelProxy(
new IPC::ChannelProxy(this, runner.get()));
#if USE_ATTACHMENT_BROKER
IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel(
- channel.get(), content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::IO));
+ channel.get(), runner);
#endif
- channel->Init(IPC::ChannelMojo::CreateServerFactory(std::move(handle)), true);
+ channel->Init(std::move(channel_factory), true);
return channel;
}
« no previous file with comments | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698