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

Side by Side Diff: base/threading/thread_checker_impl.h

Issue 2921903003: Remove base::NonThreadSafe now that all users are gone!! (Closed)
Patch Set: rebase on r477274 Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « base/threading/non_thread_safe_unittest.cc ('k') | chrome/browser/printing/print_job_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_THREADING_THREAD_CHECKER_IMPL_H_ 5 #ifndef BASE_THREADING_THREAD_CHECKER_IMPL_H_
6 #define BASE_THREADING_THREAD_CHECKER_IMPL_H_ 6 #define BASE_THREADING_THREAD_CHECKER_IMPL_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/sequence_token.h" 10 #include "base/sequence_token.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // Synchronizes access to all members. 39 // Synchronizes access to all members.
40 mutable base::Lock lock_; 40 mutable base::Lock lock_;
41 41
42 // Thread on which CalledOnValidThread() may return true. 42 // Thread on which CalledOnValidThread() may return true.
43 mutable PlatformThreadRef thread_id_; 43 mutable PlatformThreadRef thread_id_;
44 44
45 // TaskToken for which CalledOnValidThread() always returns true. This allows 45 // TaskToken for which CalledOnValidThread() always returns true. This allows
46 // CalledOnValidThread() to return true when called multiple times from the 46 // CalledOnValidThread() to return true when called multiple times from the
47 // same task, even if it's not running in a single-threaded context itself 47 // same task, even if it's not running in a single-threaded context itself
48 // (allowing usage of ThreadChecker/NonThreadSafe objects on the stack in the 48 // (allowing usage of ThreadChecker objects on the stack in the scope of one-
49 // scope of one-off tasks). Note: CalledOnValidThread() may return true even 49 // off tasks). Note: CalledOnValidThread() may return true even if the current
50 // if the current TaskToken is not equal to this. 50 // TaskToken is not equal to this.
51 mutable TaskToken task_token_; 51 mutable TaskToken task_token_;
52 52
53 // SequenceToken for which CalledOnValidThread() may return true. Used to 53 // SequenceToken for which CalledOnValidThread() may return true. Used to
54 // ensure that CalledOnValidThread() doesn't return true for TaskScheduler 54 // ensure that CalledOnValidThread() doesn't return true for TaskScheduler
55 // tasks that happen to run on the same thread but weren't posted to the same 55 // tasks that happen to run on the same thread but weren't posted to the same
56 // SingleThreadTaskRunner. 56 // SingleThreadTaskRunner.
57 mutable SequenceToken sequence_token_; 57 mutable SequenceToken sequence_token_;
58 }; 58 };
59 59
60 } // namespace base 60 } // namespace base
61 61
62 #endif // BASE_THREADING_THREAD_CHECKER_IMPL_H_ 62 #endif // BASE_THREADING_THREAD_CHECKER_IMPL_H_
OLDNEW
« no previous file with comments | « base/threading/non_thread_safe_unittest.cc ('k') | chrome/browser/printing/print_job_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698