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

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: fix linux build error 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 class SchedulerImmutableWorkerPoolParams {
18 public:
19 SchedulerImmutableWorkerPoolParams(const char* name,
20 base::ThreadPriority priority_hint);
21
22 const char* name() const { return name_; }
23 base::ThreadPriority priority_hint() const { return priority_hint_; }
24
25 private:
26 const char* name_;
27 base::ThreadPriority priority_hint_;
28 };
29
30 // Returns a SchedulerWorkerPoolParams vector to initialize pools specified in
31 // |constant_worker_pool_params_vector|. SchedulerWorkerPoolParams members
32 // without a counterpart in SchedulerImmutableWorkerPoolParams are initialized
33 // based of |variation_params|. Returns an empty vector on failure.
34 std::vector<base::SchedulerWorkerPoolParams> GetWorkerPoolParams(
35 const std::vector<SchedulerImmutableWorkerPoolParams>&
36 constant_worker_pool_params_vector,
37 const std::map<std::string, std::string>& variation_params);
38
39 } // namespace task_scheduler_util
40
41 #endif // COMPONENTS_TASK_SCHEDULER_UTIL_COMMON_VARIATIONS_UTIL_H_
OLDNEW
« no previous file with comments | « components/task_scheduler_util/common/BUILD.gn ('k') | components/task_scheduler_util/common/variations_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698