Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: components/task_scheduler_util/common/variations_util.h

Issue 2565013002: Split browser-specific and generic code in components/task_scheduler_util/. (Closed)
Patch Set: keep old APIs Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698