OLD | NEW |
---|---|
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_NON_THREAD_SAFE_H_ | 5 #ifndef BASE_THREADING_NON_THREAD_SAFE_H_ |
6 #define BASE_THREADING_NON_THREAD_SAFE_H_ | 6 #define BASE_THREADING_NON_THREAD_SAFE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // Classes deriving from NonThreadSafe may need to supress warning 4275. | |
10 #include "base/compiler_specific.h" | |
wtc
2011/05/16 20:55:17
We discussed this issue in person.
Your current s
rvargas (doing something else)
2011/05/16 22:41:56
I updated the comment to be more explicit about th
| |
11 | |
9 #ifndef NDEBUG | 12 #ifndef NDEBUG |
10 #include "base/threading/non_thread_safe_impl.h" | 13 #include "base/threading/non_thread_safe_impl.h" |
11 #endif | 14 #endif |
12 | 15 |
13 namespace base { | 16 namespace base { |
14 | 17 |
15 // Do nothing implementation of NonThreadSafe, for release mode. | 18 // Do nothing implementation of NonThreadSafe, for release mode. |
16 // | 19 // |
17 // Note: You should almost always use the NonThreadSafe class to get | 20 // Note: You should almost always use the NonThreadSafe class to get |
18 // the right version of the class for your build configuration. | 21 // the right version of the class for your build configuration. |
(...skipping 29 matching lines...) Expand all Loading... | |
48 class NonThreadSafe : public NonThreadSafeImpl { | 51 class NonThreadSafe : public NonThreadSafeImpl { |
49 }; | 52 }; |
50 #else | 53 #else |
51 class NonThreadSafe : public NonThreadSafeDoNothing { | 54 class NonThreadSafe : public NonThreadSafeDoNothing { |
52 }; | 55 }; |
53 #endif // NDEBUG | 56 #endif // NDEBUG |
54 | 57 |
55 } // namespace base | 58 } // namespace base |
56 | 59 |
57 #endif // BASE_NON_THREAD_SAFE_H_ | 60 #endif // BASE_NON_THREAD_SAFE_H_ |
OLD | NEW |