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

Unified Diff: base/task_scheduler/task_scheduler_impl.h

Issue 2764603002: Add TaskScheduler::InitParams and accept it in TaskSchedulerImpl constructor. (Closed)
Patch Set: no offsetof Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task_scheduler/task_scheduler.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_scheduler_impl.h
diff --git a/base/task_scheduler/task_scheduler_impl.h b/base/task_scheduler/task_scheduler_impl.h
index 5a83d0a6dbeacdc4271e8dbdefb7b59352522ad9..0bbb48b74ebd8a10028c5193f5d13fe1499a827c 100644
--- a/base/task_scheduler/task_scheduler_impl.h
+++ b/base/task_scheduler/task_scheduler_impl.h
@@ -35,9 +35,22 @@ class TaskTracker;
class BASE_EXPORT TaskSchedulerImpl : public TaskScheduler {
public:
// Creates and returns an initialized TaskSchedulerImpl. CHECKs on failure.
+ // |name| is used to label threads and histograms. It should identify the
+ // component that creates the TaskScheduler. |init_params| contains params to
+ // initialize worker pools.
+ //
+ // Note: The names and priority hints in |init_params| are ignored.
+ // https://crbug.com/690706
+ static std::unique_ptr<TaskSchedulerImpl> Create(
+ const std::string& name,
+ const TaskScheduler::InitParams& init_params);
+
+ // Creates and returns an initialized TaskSchedulerImpl. CHECKs on failure.
// |worker_pool_params_vector| describes the worker pools to create.
// |worker_pool_index_for_traits_callback| returns the index in |worker_pools|
// of the worker pool in which a task with given traits should run.
+ //
+ // Deprecated. https://crbug.com/690706
static std::unique_ptr<TaskSchedulerImpl> Create(
const std::vector<SchedulerWorkerPoolParams>& worker_pool_params_vector,
const WorkerPoolIndexForTraitsCallback&
« no previous file with comments | « base/task_scheduler/task_scheduler.cc ('k') | base/task_scheduler/task_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698