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

Unified Diff: base/synchronization/waitable_event_watcher_posix.cc

Issue 1100773004: base: Remove most uses of MessageLoopProxy (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
Index: base/synchronization/waitable_event_watcher_posix.cc
diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc
index 6fc337cc81b420b504cef3be0d7194557082d86d..ad66a4c769a46856c51bf740eb79bf07d1507965 100644
--- a/base/synchronization/waitable_event_watcher_posix.cc
+++ b/base/synchronization/waitable_event_watcher_posix.cc
@@ -6,7 +6,7 @@
#include "base/bind.h"
#include "base/location.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
@@ -68,7 +68,7 @@ class AsyncWaiter : public WaitableEvent::Waiter {
bool Fire(WaitableEvent* event) override {
// Post the callback if we haven't been cancelled.
if (!flag_->value()) {
- message_loop_->PostTask(FROM_HERE, callback_);
+ message_loop_->task_runner()->PostTask(FROM_HERE, callback_);
}
// We are removed from the wait-list by the WaitableEvent itself. It only
@@ -158,7 +158,7 @@ bool WaitableEventWatcher::StartWatching(
// No hairpinning - we can't call the delegate directly here. We have to
// enqueue a task on the MessageLoop as normal.
- current_ml->PostTask(FROM_HERE, internal_callback_);
+ current_ml->task_runner()->PostTask(FROM_HERE, internal_callback_);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698