Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: base/task_scheduler/task_scheduler_impl_unittest.cc

Issue 2163023002: Unify usage of logging/assert macros in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops commit on wrong branch Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/task_scheduler/task_scheduler_impl_unittest.cc
diff --git a/base/task_scheduler/task_scheduler_impl_unittest.cc b/base/task_scheduler/task_scheduler_impl_unittest.cc
index c14056ca670053a6c1f566a6ee19eca240f2feda..67422097f3bd9ee16258a38546d23cfac63d366f 100644
--- a/base/task_scheduler/task_scheduler_impl_unittest.cc
+++ b/base/task_scheduler/task_scheduler_impl_unittest.cc
@@ -38,7 +38,7 @@ struct TraitsExecutionModePair {
ExecutionMode execution_mode;
};
-#if ENABLE_THREAD_RESTRICTIONS
+#if DCHECK_IS_ON()
// Returns whether I/O calls are allowed on the current thread.
bool GetIOAllowed() {
const bool previous_value = ThreadRestrictions::SetIOAllowed(true);
@@ -56,9 +56,9 @@ void VerifyTaskEnvironement(const TaskTraits& traits) {
: ThreadPriority::NORMAL,
PlatformThread::GetCurrentThreadPriority());
-#if ENABLE_THREAD_RESTRICTIONS
+#if DCHECK_IS_ON()
// The #if above is required because GetIOAllowed() always returns true when
- // !ENABLE_THREAD_RESTRICTIONS, even when |traits| don't allow file I/O.
+ // !DCHECK_IS_ON(), even when |traits| don't allow file I/O.
EXPECT_EQ(traits.with_file_io(), GetIOAllowed());
#endif

Powered by Google App Engine
This is Rietveld 408576698