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

Unified Diff: mojo/public/cpp/system/watcher.h

Issue 2608163003: Change single-interface mojo bindings to use SequencedTaskRunner. (Closed)
Patch Set: Created 3 years, 11 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/public/cpp/bindings/thread_safe_interface_ptr.h ('k') | mojo/public/cpp/system/watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/watcher.h
diff --git a/mojo/public/cpp/system/watcher.h b/mojo/public/cpp/system/watcher.h
index 236788b1c853139367df8b0a56b44859064219ca..7bcf15da8a240cba471128d777f9c55bb37f53df 100644
--- a/mojo/public/cpp/system/watcher.h
+++ b/mojo/public/cpp/system/watcher.h
@@ -9,9 +9,9 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "base/single_thread_task_runner.h"
-#include "base/threading/thread_checker.h"
-#include "base/threading/thread_task_runner_handle.h"
+#include "base/sequence_checker.h"
+#include "base/sequenced_task_runner.h"
+#include "base/threading/sequenced_task_runner_handle.h"
#include "mojo/public/c/system/types.h"
#include "mojo/public/cpp/system/handle.h"
#include "mojo/public/cpp/system/system_export.h"
@@ -37,8 +37,8 @@ class MOJO_CPP_SYSTEM_EXPORT Watcher {
using ReadyCallback = base::Callback<void(MojoResult result)>;
Watcher(const tracked_objects::Location& from_here,
- scoped_refptr<base::SingleThreadTaskRunner> runner =
- base::ThreadTaskRunnerHandle::Get());
+ scoped_refptr<base::SequencedTaskRunner> runner =
+ base::SequencedTaskRunnerHandle::Get());
// NOTE: This destructor automatically calls |Cancel()| if the Watcher is
// still active.
@@ -89,11 +89,11 @@ class MOJO_CPP_SYSTEM_EXPORT Watcher {
MojoHandleSignalsState signals_state,
MojoWatchNotificationFlags flags);
- base::ThreadChecker thread_checker_;
+ base::SequenceChecker sequence_checker_;
// The TaskRunner of this Watcher's owning thread. This field is safe to
// access from any thread.
- const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ const scoped_refptr<base::SequencedTaskRunner> task_runner_;
// Whether |task_runner_| is the same as base::ThreadTaskRunnerHandle::Get()
// for the thread.
const bool is_default_task_runner_;
« no previous file with comments | « mojo/public/cpp/bindings/thread_safe_interface_ptr.h ('k') | mojo/public/cpp/system/watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698