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

Unified Diff: ui/gl/gl_surface_glx.cc

Issue 2911113002: Replace deprecated base::NonThreadSafe in ui/gl in favor of ThreadChecker. (Closed)
Patch Set: SequenceChecker => ThreadChecker 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 2543994be797942c7947560c7bb968d99ad5a636..4c0afc9d2c180f5398aca76931e5fc9677f57955 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -18,8 +18,8 @@ extern "C" {
#include "base/single_thread_task_runner.h"
#include "base/synchronization/cancellation_flag.h"
#include "base/synchronization/lock.h"
-#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_checker.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -171,7 +171,6 @@ class OMLSyncControlVSyncProvider : public SyncControlVSyncProvider {
};
class SGIVideoSyncThread : public base::Thread,
- public base::NonThreadSafe,
public base::RefCounted<SGIVideoSyncThread> {
public:
static scoped_refptr<SGIVideoSyncThread> Create() {
@@ -186,17 +185,19 @@ class SGIVideoSyncThread : public base::Thread,
friend class base::RefCounted<SGIVideoSyncThread>;
SGIVideoSyncThread() : base::Thread("SGI_video_sync") {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
}
~SGIVideoSyncThread() override {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
g_video_sync_thread = nullptr;
Stop();
}
static SGIVideoSyncThread* g_video_sync_thread;
+ THREAD_CHECKER(thread_checker_);
+
DISALLOW_COPY_AND_ASSIGN(SGIVideoSyncThread);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698