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

Unified Diff: base/task_scheduler/task_tracker.cc

Issue 2590443005: Add TaskTraits::MayBlock and TaskTraits::WithSyncPrimitives. (Closed)
Patch Set: CR Created 4 years 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/task_scheduler_impl_unittest.cc ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_tracker.cc
diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc
index 4c1ee8da3dd285ea1f668cab15b4f4565e91059e..87b75b45a0bfece5a4e0bce46ec0891692e02185 100644
--- a/base/task_scheduler/task_tracker.cc
+++ b/base/task_scheduler/task_tracker.cc
@@ -225,9 +225,9 @@ bool TaskTracker::RunTask(std::unique_ptr<Task> task,
task->traits.shutdown_behavior() !=
TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN);
const bool previous_io_allowed =
- ThreadRestrictions::SetIOAllowed(task->traits.with_file_io());
+ ThreadRestrictions::SetIOAllowed(task->traits.may_block());
const bool previous_wait_allowed =
- ThreadRestrictions::SetWaitAllowed(task->traits.with_wait());
+ ThreadRestrictions::SetWaitAllowed(task->traits.with_sync_primitives());
{
ScopedSetSequenceTokenForCurrentThread
« no previous file with comments | « base/task_scheduler/task_scheduler_impl_unittest.cc ('k') | base/task_scheduler/task_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698