OLD | NEW |
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 // TODO(fdoray): Remove this file once TaskScheduler initialization in the |
| 6 // browser process uses the components/task_scheduler_util/browser/ API on all |
| 7 // platforms. |
| 8 |
5 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ | 9 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ |
6 #define COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ | 10 #define COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ |
7 | 11 |
8 #include <vector> | 12 #include <vector> |
9 | 13 |
10 #include "base/task_scheduler/scheduler_worker_pool_params.h" | 14 namespace base { |
| 15 class SchedulerWorkerPoolParams; |
| 16 } |
11 | 17 |
12 namespace task_scheduler_util { | 18 namespace task_scheduler_util { |
13 namespace variations { | 19 namespace variations { |
14 | 20 |
15 // Gets the browser SchedulerWorkerPoolParams vector based off of variations. | 21 // Gets the browser SchedulerWorkerPoolParams vector based off of variations. |
16 // Returns an empty vector on failure. | 22 // Returns an empty vector on failure. |
17 std::vector<base::SchedulerWorkerPoolParams> | 23 std::vector<base::SchedulerWorkerPoolParams> |
18 GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 24 GetBrowserSchedulerWorkerPoolParamsFromVariations(); |
19 | 25 |
20 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off | 26 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off |
21 // of input from the variations parameters. | 27 // of input from the variations parameters. |
22 void MaybePerformBrowserTaskSchedulerRedirection(); | 28 void MaybePerformBrowserTaskSchedulerRedirection(); |
23 | 29 |
24 } // variations | 30 } // variations |
25 } // namespace task_scheduler_util | 31 } // namespace task_scheduler_util |
26 | 32 |
27 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ | 33 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_VARIATIONS_BROWSER_VARIATIONS_UTIL_H_ |
OLD | NEW |