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

Unified Diff: remoting/host/local_input_monitor_mac.mm

Issue 2911893003: Deprecate NonThreadSafe in remoting in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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 | « remoting/host/ipc_host_event_logger.cc ('k') | remoting/host/local_input_monitor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_mac.mm
diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm
index 961d7efda125e26c1a6f10a080ef6f64551bc65d..e3b4aa7da5c0cc08317d07056ed3bd8597cfeebe 100644
--- a/remoting/host/local_input_monitor_mac.mm
+++ b/remoting/host/local_input_monitor_mac.mm
@@ -17,9 +17,9 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
+#include "base/sequence_checker.h"
#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
-#include "base/threading/non_thread_safe.h"
#include "remoting/host/client_session_control.h"
#import "third_party/google_toolbox_for_mac/src/AppKit/GTMCarbonEvent.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
@@ -31,8 +31,7 @@ static const NSUInteger kEscKeyCode = 53;
namespace remoting {
namespace {
-class LocalInputMonitorMac : public base::NonThreadSafe,
- public LocalInputMonitor {
+class LocalInputMonitorMac : public LocalInputMonitor {
public:
// Invoked by LocalInputMonitorManager.
class EventHandler {
@@ -54,6 +53,8 @@ class LocalInputMonitorMac : public base::NonThreadSafe,
class Core;
scoped_refptr<Core> core_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorMac);
};
@@ -209,6 +210,7 @@ LocalInputMonitorMac::LocalInputMonitorMac(
}
LocalInputMonitorMac::~LocalInputMonitorMac() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
core_->Stop();
}
« no previous file with comments | « remoting/host/ipc_host_event_logger.cc ('k') | remoting/host/local_input_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698