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

Side by Side Diff: components/task_scheduler_util/browser/initialization.h

Issue 2788223002: Generate TaskScheduler::InitParams from components/task_scheduler_util/. (Closed)
Patch Set: fix-build-error Created 3 years, 8 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 unified diff | Download patch
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 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 5 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
6 #define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/task_scheduler/scheduler_worker_pool_params.h" 13 #include "base/task_scheduler/scheduler_worker_pool_params.h"
14 #include "base/task_scheduler/task_scheduler.h"
13 15
14 namespace base { 16 namespace base {
15 class TaskTraits; 17 class TaskTraits;
16 } 18 }
17 19
18 namespace task_scheduler_util { 20 namespace task_scheduler_util {
19 21
22 // Gets a TaskScheduler::InitParams object to initialize TaskScheduler in the
23 // browser based off variations. Returns nullptr on failure.
24 std::unique_ptr<base::TaskScheduler::InitParams>
25 GetBrowserTaskSchedulerInitParamsFromVariations();
26
20 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in the 27 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in the
21 // browser based off variations. Returns an empty vector on failure. 28 // browser based off variations. Returns an empty vector on failure.
29 //
30 // Deprecated. https://crbug.com/690706
22 std::vector<base::SchedulerWorkerPoolParams> 31 std::vector<base::SchedulerWorkerPoolParams>
23 GetBrowserWorkerPoolParamsFromVariations(); 32 GetBrowserWorkerPoolParamsFromVariations();
24 33
25 // Maps |traits| to the index of a browser worker pool vector provided by 34 // Maps |traits| to the index of a browser worker pool vector provided by
26 // GetBrowserWorkerPoolParamsFromVariations(). 35 // GetBrowserWorkerPoolParamsFromVariations().
36 //
37 // Deprecated. https://crbug.com/690706
27 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits); 38 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits);
28 39
29 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off 40 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off
30 // variations. 41 // variations.
31 void MaybePerformBrowserTaskSchedulerRedirection(); 42 void MaybePerformBrowserTaskSchedulerRedirection();
32 43
33 } // namespace task_scheduler_util 44 } // namespace task_scheduler_util
34 45
35 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ 46 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_
OLDNEW
« no previous file with comments | « base/task_scheduler/scheduler_worker_pool_params.h ('k') | components/task_scheduler_util/browser/initialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698