| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_RENDERER_INITIALIZATION_H_ | 5 #ifndef COMPONENTS_TASK_SCHEDULER_UTIL_RENDERER_INITIALIZATION_H_ |
| 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_RENDERER_INITIALIZATION_H_ | 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_RENDERER_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 TaskSchedulerInitParams object to initialize TaskScheduler in a |
| 23 // renderer based off variations specified on the command line. Returns nullptr |
| 24 // on failure. |
| 25 std::unique_ptr<base::TaskScheduler::InitParams> |
| 26 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
| 27 |
| 20 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in a | 28 // Gets a vector of SchedulerWorkerPoolParams to initialize TaskScheduler in a |
| 21 // renderer based off variation params specified on the command line. Returns an | 29 // renderer based off variation params specified on the command line. Returns an |
| 22 // empty vector if variation params specified on the command line are incomplete | 30 // empty vector if variation params specified on the command line are incomplete |
| 23 // or invalid. | 31 // or invalid. |
| 32 // |
| 33 // Deprecated. https://crbug.com/690706 |
| 24 std::vector<base::SchedulerWorkerPoolParams> GetRendererWorkerPoolParams(); | 34 std::vector<base::SchedulerWorkerPoolParams> GetRendererWorkerPoolParams(); |
| 25 | 35 |
| 26 // Maps |traits| to the index of a renderer worker pool vector provided by | 36 // Maps |traits| to the index of a renderer worker pool vector provided by |
| 27 // GetRendererWorkerPoolParams(). | 37 // GetRendererWorkerPoolParams(). |
| 38 // |
| 39 // Deprecated. https://crbug.com/690706 |
| 28 size_t RendererWorkerPoolIndexForTraits(const base::TaskTraits& traits); | 40 size_t RendererWorkerPoolIndexForTraits(const base::TaskTraits& traits); |
| 29 | 41 |
| 30 } // namespace task_scheduler_util | 42 } // namespace task_scheduler_util |
| 31 | 43 |
| 32 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_RENDERER_INITIALIZATION_H_ | 44 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_RENDERER_INITIALIZATION_H_ |
| OLD | NEW |