| 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 #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 #pragma once | |
| 8 | 7 |
| 9 // Apart from debug builds, we also enable the thread checker in | 8 // Apart from debug builds, we also enable the thread checker in |
| 10 // builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots | 9 // builds with DCHECK_ALWAYS_ON so that trybots and waterfall bots |
| 11 // with this define will get the same level of thread checking as | 10 // with this define will get the same level of thread checking as |
| 12 // debug bots. | 11 // debug bots. |
| 13 // | 12 // |
| 14 // Note that this does not perfectly match situations where DCHECK is | 13 // Note that this does not perfectly match situations where DCHECK is |
| 15 // enabled. For example a non-official release build may have | 14 // enabled. For example a non-official release build may have |
| 16 // DCHECK_ALWAYS_ON undefined (and therefore ThreadChecker would be | 15 // DCHECK_ALWAYS_ON undefined (and therefore ThreadChecker would be |
| 17 // disabled) but have DCHECKs enabled at runtime. | 16 // disabled) but have DCHECKs enabled at runtime. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 #else | 76 #else |
| 78 class ThreadChecker : public ThreadCheckerDoNothing { | 77 class ThreadChecker : public ThreadCheckerDoNothing { |
| 79 }; | 78 }; |
| 80 #endif // ENABLE_THREAD_CHECKER | 79 #endif // ENABLE_THREAD_CHECKER |
| 81 | 80 |
| 82 #undef ENABLE_THREAD_CHECKER | 81 #undef ENABLE_THREAD_CHECKER |
| 83 | 82 |
| 84 } // namespace base | 83 } // namespace base |
| 85 | 84 |
| 86 #endif // BASE_THREADING_THREAD_CHECKER_H_ | 85 #endif // BASE_THREADING_THREAD_CHECKER_H_ |
| OLD | NEW |