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 SchedulerConstantWorkerPoolParams { | |
gab
2016/12/12 17:07:21
Comment (mention it's an immutable data struct) an
| |
18 SchedulerConstantWorkerPoolParams(const char* name, | |
19 base::ThreadPriority priority_hint); | |
20 | |
21 const char* name; | |
gab
2016/12/12 17:07:21
const char* const
| |
22 base::ThreadPriority priority_hint; | |
gab
2016/12/12 17:07:21
const
| |
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 SchedulerConstantWorkerPoolParams are initialized | |
28 // based of |variation_params|. Returns an empty vector on failure. | |
29 std::vector<base::SchedulerWorkerPoolParams> GetWorkerPoolParams( | |
30 const std::vector<SchedulerConstantWorkerPoolParams> | |
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 |