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

Unified Diff: mojo/common/handle_watcher.cc

Issue 1118473002: [mojo] Replace MessageLoopProxy usage with ThreadTaskRunnerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « mojo/application/content_handler_factory.cc ('k') | mojo/runner/child_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/handle_watcher.cc
diff --git a/mojo/common/handle_watcher.cc b/mojo/common/handle_watcher.cc
index 79cdcdb616b7e8cc5c1b69603b945b52f06ced65..747e178f729ca0f6788908e1817912dbd6a450fa 100644
--- a/mojo/common/handle_watcher.cc
+++ b/mojo/common/handle_watcher.cc
@@ -14,9 +14,10 @@
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
+#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
@@ -50,7 +51,7 @@ struct WatchData {
MojoHandleSignals handle_signals;
base::TimeTicks deadline;
base::Callback<void(MojoResult)> callback;
- scoped_refptr<base::MessageLoopProxy> message_loop;
+ scoped_refptr<base::SingleThreadTaskRunner> message_loop;
sky 2015/05/01 15:21:53 Rename this.
anujsharma 2015/05/04 06:56:39 Done.
};
// WatcherBackend --------------------------------------------------------------
@@ -238,8 +239,8 @@ WatcherID WatcherThreadManager::StartWatching(
request_data.start_data.callback = callback;
request_data.start_data.handle_signals = handle_signals;
request_data.start_data.deadline = deadline;
- request_data.start_data.message_loop = base::MessageLoopProxy::current();
- DCHECK_NE(static_cast<base::MessageLoopProxy*>(NULL),
+ request_data.start_data.message_loop = base::ThreadTaskRunnerHandle::Get();
+ DCHECK_NE(static_cast<base::SingleThreadTaskRunner*>(NULL),
request_data.start_data.message_loop.get());
AddRequest(request_data);
return request_data.start_data.id;
« no previous file with comments | « mojo/application/content_handler_factory.cc ('k') | mojo/runner/child_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698