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

Unified Diff: content/child/mojo/mojo_application.cc

Issue 987693005: Get rid of ChannelInit::SetSingleProcessIOTaskRunner() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 5 years, 9 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 | « content/child/mojo/mojo_application.h ('k') | content/common/in_process_child_thread_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/mojo/mojo_application.cc
diff --git a/content/child/mojo/mojo_application.cc b/content/child/mojo/mojo_application.cc
index f896dc69a49dd7526ff8a1d277aaa84c92f21a98..5deee5df88afbfa76260185d4c7cfe130caabe2f 100644
--- a/content/child/mojo/mojo_application.cc
+++ b/content/child/mojo/mojo_application.cc
@@ -13,7 +13,10 @@
namespace content {
-MojoApplication::MojoApplication() {
+MojoApplication::MojoApplication(
+ scoped_refptr<base::SequencedTaskRunner> io_task_runner)
+ : io_task_runner_(io_task_runner) {
+ DCHECK(io_task_runner_);
}
MojoApplication::~MojoApplication() {
@@ -35,15 +38,9 @@ void MojoApplication::OnActivate(
#elif defined(OS_WIN)
base::PlatformFile handle = file;
#endif
- scoped_refptr<base::TaskRunner> io_task_runner =
- ChannelInit::GetSingleProcessIOTaskRunner();
- if (!io_task_runner) {
- io_task_runner = ChildProcess::current()->io_message_loop_proxy();
- }
- DCHECK(io_task_runner);
mojo::ScopedMessagePipeHandle message_pipe =
- channel_init_.Init(handle, io_task_runner);
+ channel_init_.Init(handle, io_task_runner_);
DCHECK(message_pipe.is_valid());
ApplicationSetupPtr application_setup;
« no previous file with comments | « content/child/mojo/mojo_application.h ('k') | content/common/in_process_child_thread_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698