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

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 2464963002: TaskScheduler: Remove base::ExecutionMode. (Closed)
Patch Set: CR danakj #17 Created 4 years, 1 month 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/test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool.cc
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc
index 2d473bf0fca602917115580e032a56c4b40e718d..234f908d950da922a7d9b11c215ba6c486670863 100644
--- a/base/threading/sequenced_worker_pool.cc
+++ b/base/threading/sequenced_worker_pool.cc
@@ -848,9 +848,9 @@ SequencedWorkerPool::Inner::GetTaskSchedulerTaskRunner(
// same shutdown behavior.
if (!task_runner) {
- ExecutionMode execution_mode =
- sequence_token_id ? ExecutionMode::SEQUENCED : ExecutionMode::PARALLEL;
- task_runner = CreateTaskRunnerWithTraits(traits, execution_mode);
+ task_runner = sequence_token_id
+ ? CreateSequencedTaskRunnerWithTraits(traits)
+ : CreateTaskRunnerWithTraits(traits);
}
return task_runner;
@@ -862,8 +862,7 @@ bool SequencedWorkerPool::Inner::RunsTasksOnCurrentThread() const {
AllPoolsState::REDIRECTED_TO_TASK_SCHEDULER) {
if (!runs_tasks_on_verifier_) {
runs_tasks_on_verifier_ = CreateTaskRunnerWithTraits(
- TaskTraits().WithFileIO().WithPriority(task_priority_),
- ExecutionMode::PARALLEL);
+ TaskTraits().WithFileIO().WithPriority(task_priority_));
}
return runs_tasks_on_verifier_->RunsTasksOnCurrentThread();
} else {
« no previous file with comments | « base/task_scheduler/test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698