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

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

Issue 2570693003: Move Task Scheduler Initialization From ios/chrome/browser to Web (Closed)
Patch Set: Merge Fixes 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 unified diff | Download patch
« no previous file with comments | « components/task_scheduler_util/initialization_util.h ('k') | ios/chrome/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/task_scheduler_util/initialization_util.h"
6
7 #include <vector>
8
9 #include "base/bind.h"
10 #include "base/task_scheduler/scheduler_worker_pool_params.h"
11 #include "base/task_scheduler/task_scheduler.h"
12 #include "components/task_scheduler_util/initialization/browser_util.h"
13 #include "components/task_scheduler_util/variations/browser_variations_util.h"
14
15 namespace task_scheduler_util {
16
17 #if defined(OS_IOS)
18 void InitializeDefaultBrowserTaskScheduler() {
19 std::vector<base::SchedulerWorkerPoolParams> params_vector =
20 variations::GetBrowserSchedulerWorkerPoolParamsFromVariations();
21 if (params_vector.empty()) {
22 params_vector =
23 initialization::GetDefaultBrowserSchedulerWorkerPoolParams();
24 }
25
26 base::TaskScheduler::CreateAndSetDefaultTaskScheduler(
27 params_vector,
28 base::Bind(&initialization::BrowserWorkerPoolIndexForTraits));
29 task_scheduler_util::variations::
30 MaybePerformBrowserTaskSchedulerRedirection();
31 }
32 #endif // defined(OS_IOS)
33
34 } // namespace task_scheduler_util
OLDNEW
« no previous file with comments | « components/task_scheduler_util/initialization_util.h ('k') | ios/chrome/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698