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

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

Issue 2905213002: WARN_UNUSED_RESULT on all Thread/SequenceChecker impls (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 unified diff | Download patch
« no previous file with comments | « base/sequence_checker.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef BASE_THREADING_THREAD_CHECKER_H_
6 #define BASE_THREADING_THREAD_CHECKER_H_ 6 #define BASE_THREADING_THREAD_CHECKER_H_
7 7
8 #include "base/compiler_specific.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/threading/thread_checker_impl.h" 10 #include "base/threading/thread_checker_impl.h"
10 11
11 // ThreadChecker is a helper class used to help verify that some methods of a 12 // ThreadChecker is a helper class used to help verify that some methods of a
12 // class are called from the same thread (for thread-affinity). 13 // class are called from the same thread (for thread-affinity).
13 // 14 //
14 // Use the macros below instead of the ThreadChecker directly so that the unused 15 // Use the macros below instead of the ThreadChecker directly so that the unused
15 // member doesn't result in an extra byte (four when padded) per instance in 16 // member doesn't result in an extra byte (four when padded) per instance in
16 // production. 17 // production.
17 // 18 //
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 class ThreadChecker : public ThreadCheckerImpl { 93 class ThreadChecker : public ThreadCheckerImpl {
93 }; 94 };
94 #else 95 #else
95 class ThreadChecker : public ThreadCheckerDoNothing { 96 class ThreadChecker : public ThreadCheckerDoNothing {
96 }; 97 };
97 #endif // DCHECK_IS_ON() 98 #endif // DCHECK_IS_ON()
98 99
99 } // namespace base 100 } // namespace base
100 101
101 #endif // BASE_THREADING_THREAD_CHECKER_H_ 102 #endif // BASE_THREADING_THREAD_CHECKER_H_
OLDNEW
« no previous file with comments | « base/sequence_checker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698