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

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: fix base/android/build_info.cc compile 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
« no previous file with comments | « base/task_scheduler/scheduler_worker_pool_impl_unittest.cc ('k') | base/threading/non_thread_safe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d275fbf56466f444a325c8aca9676299fb634106..b49e5b9de94ce34b0907bea0d5bfbb29977a9593 100644
--- a/base/task_scheduler/task_scheduler_impl_unittest.cc
+++ b/base/task_scheduler/task_scheduler_impl_unittest.cc
@@ -40,7 +40,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);
@@ -58,9 +58,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
« no previous file with comments | « base/task_scheduler/scheduler_worker_pool_impl_unittest.cc ('k') | base/threading/non_thread_safe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698