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

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

Issue 2540903002: Remove MessageLoop destruction observer from mojo::Watcher. (Closed)
Patch Set: . Created 4 years, 1 month 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/system/tests/watcher_unittest.cc ('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 3284154b2d886d97b9ecbde4e23e2255ce121077..815b73b3b50b1d7dc71bbb465587862a2aeb2301 100644
--- a/mojo/public/cpp/system/watcher.h
+++ b/mojo/public/cpp/system/watcher.h
@@ -5,8 +5,6 @@
#ifndef MOJO_PUBLIC_CPP_SYSTEM_WATCHER_H_
#define MOJO_PUBLIC_CPP_SYSTEM_WATCHER_H_
-#include <memory>
-
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -36,11 +34,6 @@ class MOJO_CPP_SYSTEM_EXPORT Watcher {
//
// |MOJO_RESULT_CANCELLED|: The handle has been closed and the watch has
// been cancelled implicitly.
- //
- // |MOJO_RESULT_ABORTED|: Notifications can no longer be delivered for this
- // watcher for some unspecified reason, e.g., the watching thread may
- // be shutting down soon. Note that it is still necessary to explicitly
- // Cancel() the watch in this case.
using ReadyCallback = base::Callback<void(MojoResult result)>;
explicit Watcher(scoped_refptr<base::SingleThreadTaskRunner> runner =
@@ -82,9 +75,6 @@ class MOJO_CPP_SYSTEM_EXPORT Watcher {
ReadyCallback ready_callback() const { return callback_; }
private:
- class MessageLoopObserver;
- friend class MessageLoopObserver;
-
void OnHandleReady(MojoResult result);
static void CallOnHandleReady(uintptr_t context,
@@ -101,8 +91,6 @@ class MOJO_CPP_SYSTEM_EXPORT Watcher {
// for the thread.
const bool is_default_task_runner_;
- std::unique_ptr<MessageLoopObserver> message_loop_observer_;
-
// A persistent weak reference to this Watcher which can be passed to the
// Dispatcher any time this object should be signalled. Safe to access (but
// not to dereference!) from any thread.
« no previous file with comments | « mojo/public/cpp/system/tests/watcher_unittest.cc ('k') | mojo/public/cpp/system/watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698