| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/sequence_checker.h" | 5 #include "base/sequence_checker.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 14 #include "base/location.h" | 14 #include "base/location.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
| 19 #include "base/test/sequenced_worker_pool_owner.h" | 19 #include "base/test/sequenced_worker_pool_owner.h" |
| 20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 // Duplicated from base/sequence_checker.h so that we can be good citizens | 23 // Duplicated from base/sequence_checker.h so that we can be good citizens |
| 24 // there and undef the macro. | 24 // there and undef the macro. |
| 25 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 25 #if DCHECK_IS_ON() |
| 26 #define ENABLE_SEQUENCE_CHECKER 1 | 26 #define ENABLE_SEQUENCE_CHECKER 1 |
| 27 #else | 27 #else |
| 28 #define ENABLE_SEQUENCE_CHECKER 0 | 28 #define ENABLE_SEQUENCE_CHECKER 0 |
| 29 #endif | 29 #endif |
| 30 | 30 |
| 31 namespace base { | 31 namespace base { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 const size_t kNumWorkerThreads = 3; | 35 const size_t kNumWorkerThreads = 3; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 #endif // ENABLE_SEQUENCE_CHECKER | 326 #endif // ENABLE_SEQUENCE_CHECKER |
| 327 | 327 |
| 328 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_SEQUENCE_CHECKER | 328 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_SEQUENCE_CHECKER |
| 329 | 329 |
| 330 } // namespace | 330 } // namespace |
| 331 | 331 |
| 332 } // namespace base | 332 } // namespace base |
| 333 | 333 |
| 334 // Just in case we ever get lumped together with other compilation units. | 334 // Just in case we ever get lumped together with other compilation units. |
| 335 #undef ENABLE_SEQUENCE_CHECKER | 335 #undef ENABLE_SEQUENCE_CHECKER |
| OLD | NEW |