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

Unified Diff: content/browser/mojo/mojo_application_host.cc

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 years, 10 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
Index: content/browser/mojo/mojo_application_host.cc
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc
index 883945f92badedb8198ec0bc0ad776fc89acc62b..a9d00026bd04ee8c352712ff818a1a899dbc6428 100644
--- a/content/browser/mojo/mojo_application_host.cc
+++ b/content/browser/mojo/mojo_application_host.cc
@@ -63,9 +63,18 @@ bool MojoApplicationHost::Init() {
mojo::embedder::PlatformChannelPair channel_pair;
+ scoped_refptr<base::TaskRunner> io_task_runner;
+ if (io_task_runner_override_) {
+ io_task_runner = io_task_runner_override_;
+ } else {
+ io_task_runner =
+ BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO)
+ ->task_runner();
+ }
+
mojo::ScopedMessagePipeHandle message_pipe = channel_init_.Init(
PlatformFileFromScopedPlatformHandle(channel_pair.PassServerHandle()),
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
+ io_task_runner);
if (!message_pipe.is_valid())
return false;
@@ -93,4 +102,9 @@ void MojoApplicationHost::WillDestroySoon() {
channel_init_.WillDestroySoon();
}
+void MojoApplicationHost::OverrideIOTaskRunnerForTest(
+ scoped_refptr<base::TaskRunner> io_task_runner) {
+ io_task_runner_override_ = io_task_runner;
+}
+
} // namespace content
« no previous file with comments | « content/browser/mojo/mojo_application_host.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698