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

Unified Diff: remoting/host/local_input_monitor_x11.cc

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/local_input_monitor_win.cc ('k') | remoting/host/native_messaging/pipe_messaging_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_x11.cc
diff --git a/remoting/host/local_input_monitor_x11.cc b/remoting/host/local_input_monitor_x11.cc
index 906139b01a2fd9523467a87462d539f19399a6b4..cca14fda7cbeb2e5a9cc68619629b7e0a4923a1f 100644
--- a/remoting/host/local_input_monitor_x11.cc
+++ b/remoting/host/local_input_monitor_x11.cc
@@ -8,6 +8,7 @@
#include <unistd.h>
#include "base/memory/ptr_util.h"
+#include "base/sequence_checker.h"
#define XK_MISCELLANY
#include <X11/keysymdef.h>
@@ -19,7 +20,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
-#include "base/threading/non_thread_safe.h"
#include "remoting/host/client_session_control.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
@@ -33,8 +33,7 @@ namespace remoting {
namespace {
-class LocalInputMonitorX11 : public base::NonThreadSafe,
- public LocalInputMonitor {
+class LocalInputMonitorX11 : public LocalInputMonitor {
public:
LocalInputMonitorX11(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
@@ -97,6 +96,8 @@ class LocalInputMonitorX11 : public base::NonThreadSafe,
scoped_refptr<Core> core_;
+ SEQUENCE_CHECKER(sequence_checker_);
+
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorX11);
};
@@ -111,6 +112,7 @@ LocalInputMonitorX11::LocalInputMonitorX11(
}
LocalInputMonitorX11::~LocalInputMonitorX11() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
core_->Stop();
}
« no previous file with comments | « remoting/host/local_input_monitor_win.cc ('k') | remoting/host/native_messaging/pipe_messaging_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698