OLD | NEW |
(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 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ |
| 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ |
| 7 |
| 8 #include <stddef.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 namespace base { |
| 13 class SchedulerWorkerPoolParams; |
| 14 class TaskTraits; |
| 15 } |
| 16 |
| 17 namespace task_scheduler_util { |
| 18 |
| 19 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in the |
| 20 // browser based off variations. Returns an empty vector on failure. |
| 21 std::vector<base::SchedulerWorkerPoolParams> |
| 22 GetBrowserWorkerPoolParamsFromVariations(); |
| 23 |
| 24 // Maps |traits| to the index of a browser worker pool vector provided by |
| 25 // GetBrowserWorkerPoolParamsFromVariations(). |
| 26 size_t BrowserWorkerPoolIndexForTraits(const base::TaskTraits& traits); |
| 27 |
| 28 // Redirects zero-to-many PostTask APIs to the browser task scheduler based off |
| 29 // variations. |
| 30 void MaybePerformBrowserTaskSchedulerRedirection(); |
| 31 |
| 32 } // namespace task_scheduler_util |
| 33 |
| 34 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_BROWSER_INITIALIZATION_H_ |
OLD | NEW |