OLD | NEW |
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 #include "base/basictypes.h" | |
6 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/threading/non_thread_safe.h" | 8 #include "base/threading/non_thread_safe.h" |
9 #include "base/threading/simple_thread.h" | 9 #include "base/threading/simple_thread.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 // Duplicated from base/threading/non_thread_safe.h so that we can be | 12 // Duplicated from base/threading/non_thread_safe.h so that we can be |
13 // good citizens there and undef the macro. | 13 // good citizens there and undef the macro. |
14 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 14 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
15 #define ENABLE_NON_THREAD_SAFE 1 | 15 #define ENABLE_NON_THREAD_SAFE 1 |
16 #else | 16 #else |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 NonThreadSafeClass::DestructorOnDifferentThreadImpl(); | 154 NonThreadSafeClass::DestructorOnDifferentThreadImpl(); |
155 } | 155 } |
156 #endif // ENABLE_NON_THREAD_SAFE | 156 #endif // ENABLE_NON_THREAD_SAFE |
157 | 157 |
158 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_NON_THREAD_SAFE | 158 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_NON_THREAD_SAFE |
159 | 159 |
160 // Just in case we ever get lumped together with other compilation units. | 160 // Just in case we ever get lumped together with other compilation units. |
161 #undef ENABLE_NON_THREAD_SAFE | 161 #undef ENABLE_NON_THREAD_SAFE |
162 | 162 |
163 } // namespace base | 163 } // namespace base |
OLD | NEW |