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_COMMON_VARIATIONS_UTIL_H_ |
| 6 #define COMPONENTS_TASK_SCHEDULER_UTIL_COMMON_VARIATIONS_UTIL_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "base/task_scheduler/scheduler_worker_pool_params.h" |
| 13 #include "base/threading/platform_thread.h" |
| 14 |
| 15 namespace task_scheduler_util { |
| 16 |
| 17 struct SchedulerImmutableWorkerPoolParams { |
| 18 SchedulerImmutableWorkerPoolParams(const char* name_in, |
| 19 base::ThreadPriority priority_hint_in); |
| 20 |
| 21 const char* const name; |
| 22 const base::ThreadPriority priority_hint; |
| 23 }; |
| 24 |
| 25 // Returns a SchedulerWorkerPoolParams vector to initialize pools specified in |
| 26 // |constant_worker_pool_params_vector|. SchedulerWorkerPoolParams members |
| 27 // without a counterpart in SchedulerImmutableWorkerPoolParams are initialized |
| 28 // based of |variation_params|. Returns an empty vector on failure. |
| 29 std::vector<base::SchedulerWorkerPoolParams> GetWorkerPoolParams( |
| 30 const std::vector<SchedulerImmutableWorkerPoolParams> |
| 31 constant_worker_pool_params_vector, |
| 32 const std::map<std::string, std::string>& variation_params); |
| 33 |
| 34 } // namespace task_scheduler_util |
| 35 |
| 36 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_COMMON_VARIATIONS_UTIL_H_ |
OLD | NEW |