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

Side by Side Diff: components/task_scheduler_util/initialization_util.cc

Issue 2445763002: Disallow posting tasks to SequencedWorkerPools by default. (Closed)
Patch Set: self-review 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 unified diff | Download patch
« no previous file with comments | « chrome/service/service_process.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/task_scheduler_util/initialization_util.h" 5 #include "components/task_scheduler_util/initialization_util.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 base::TaskScheduler::CreateAndSetDefaultTaskScheduler( 187 base::TaskScheduler::CreateAndSetDefaultTaskScheduler(
188 params_vector, base::Bind(WorkerPoolIndexForTraits)); 188 params_vector, base::Bind(WorkerPoolIndexForTraits));
189 189
190 // TODO(gab): Remove this when http://crbug.com/622400 concludes. 190 // TODO(gab): Remove this when http://crbug.com/622400 concludes.
191 const auto sequenced_worker_pool_param = 191 const auto sequenced_worker_pool_param =
192 variation_params.find("RedirectSequencedWorkerPools"); 192 variation_params.find("RedirectSequencedWorkerPools");
193 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 193 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
194 switches::kDisableBrowserTaskScheduler) && 194 switches::kDisableBrowserTaskScheduler) &&
195 sequenced_worker_pool_param != variation_params.end() && 195 sequenced_worker_pool_param != variation_params.end() &&
196 sequenced_worker_pool_param->second == "true") { 196 sequenced_worker_pool_param->second == "true") {
197 base::SequencedWorkerPool::RedirectToTaskSchedulerForProcess(); 197 base::SequencedWorkerPool::EnableWithRedirectionToTaskSchedulerForProcess();
198 } else {
199 base::SequencedWorkerPool::EnableForProcess();
198 } 200 }
199 } 201 }
200 202
201 } // namespace task_scheduler_util 203 } // namespace task_scheduler_util
OLDNEW
« no previous file with comments | « chrome/service/service_process.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698