Index: base/threading/thread_restrictions.h |
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h |
index 0f3ad30e4ee3928bfe6813354bfda776e14c916e..30f787b1c4fc02d1436bd23b404c88f107739aca 100644 |
--- a/base/threading/thread_restrictions.h |
+++ b/base/threading/thread_restrictions.h |
@@ -6,15 +6,9 @@ |
#define BASE_THREADING_THREAD_RESTRICTIONS_H_ |
#include "base/base_export.h" |
+#include "base/logging.h" |
#include "base/macros.h" |
-// See comment at top of thread_checker.h |
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
-#define ENABLE_THREAD_RESTRICTIONS 1 |
-#else |
-#define ENABLE_THREAD_RESTRICTIONS 0 |
-#endif |
- |
class BrowserProcessImpl; |
class HistogramSynchronizer; |
class NativeBackendKWallet; |
@@ -151,7 +145,7 @@ class BASE_EXPORT ThreadRestrictions { |
DISALLOW_COPY_AND_ASSIGN(ScopedAllowSingleton); |
}; |
-#if ENABLE_THREAD_RESTRICTIONS |
+#if DCHECK_IS_ON() |
// Set whether the current thread to make IO calls. |
// Threads start out in the *allowed* state. |
// Returns the previous value. |
@@ -240,7 +234,7 @@ class BASE_EXPORT ThreadRestrictions { |
friend class views::ScreenMus; |
// END USAGE THAT NEEDS TO BE FIXED. |
-#if ENABLE_THREAD_RESTRICTIONS |
+#if DCHECK_IS_ON() |
static bool SetWaitAllowed(bool allowed); |
#else |
static bool SetWaitAllowed(bool allowed) { return true; } |