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

Side by Side Diff: base/non_thread_safe.h

Issue 43148: Remove unneeded uses of logging.h in header files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_NON_THREAD_SAFE_H__ 5 #ifndef BASE_NON_THREAD_SAFE_H__
6 #define BASE_NON_THREAD_SAFE_H__ 6 #define BASE_NON_THREAD_SAFE_H__
7 7
8 #include "base/logging.h"
9 #include "base/platform_thread.h" 8 #include "base/platform_thread.h"
10 9
11 // A helper class used to help verify that methods of a class are 10 // A helper class used to help verify that methods of a class are
12 // called from the same thread. One can inherit from this class and use 11 // called from the same thread. One can inherit from this class and use
13 // CalledOnValidThread() to verify. 12 // CalledOnValidThread() to verify.
14 // 13 //
15 // This is intended to be used with classes that appear to be thread safe, but 14 // This is intended to be used with classes that appear to be thread safe, but
16 // aren't. For example, a service or a singleton like the preferences system. 15 // aren't. For example, a service or a singleton like the preferences system.
17 // 16 //
18 // Example: 17 // Example:
(...skipping 25 matching lines...) Expand all
44 NonThreadSafe() {} 43 NonThreadSafe() {}
45 ~NonThreadSafe() {} 44 ~NonThreadSafe() {}
46 45
47 bool CalledOnValidThread() const { 46 bool CalledOnValidThread() const {
48 return true; 47 return true;
49 } 48 }
50 }; 49 };
51 #endif // NDEBUG 50 #endif // NDEBUG
52 51
53 #endif // BASE_NON_THREAD_SAFE_H__ 52 #endif // BASE_NON_THREAD_SAFE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698