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

Unified Diff: base/task_scheduler/scheduler_worker_pool_params.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 | « no previous file | base/task_scheduler/scheduler_worker_pool_params.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/scheduler_worker_pool_params.h
diff --git a/base/task_scheduler/scheduler_worker_pool_params.h b/base/task_scheduler/scheduler_worker_pool_params.h
index 4c0548c5226b15d2b94f2a46ede76dde9e48181c..daa1319cb26528766b32988ee5cd65c619c754a9 100644
--- a/base/task_scheduler/scheduler_worker_pool_params.h
+++ b/base/task_scheduler/scheduler_worker_pool_params.h
@@ -33,6 +33,8 @@ class BASE_EXPORT SchedulerWorkerPoolParams final {
// suggestion on when to reclaim idle threads. The pool is free to ignore this
// value for performance or correctness reasons. |backward_compatibility|
// indicates whether backward compatibility is enabled.
+ //
+ // TODO(fdoray): Remove this constructor. https://crbug.com/690706
SchedulerWorkerPoolParams(
const std::string& name,
ThreadPriority priority_hint,
@@ -41,6 +43,15 @@ class BASE_EXPORT SchedulerWorkerPoolParams final {
TimeDelta suggested_reclaim_time,
SchedulerBackwardCompatibility backward_compatibility =
SchedulerBackwardCompatibility::DISABLED);
+
+ // Same as above, with no explicit |name| and |priority_hint|.
+ SchedulerWorkerPoolParams(
+ StandbyThreadPolicy standby_thread_policy,
+ int max_threads,
+ TimeDelta suggested_reclaim_time,
+ SchedulerBackwardCompatibility backward_compatibility =
+ SchedulerBackwardCompatibility::DISABLED);
+
SchedulerWorkerPoolParams(const SchedulerWorkerPoolParams& other);
SchedulerWorkerPoolParams& operator=(const SchedulerWorkerPoolParams& other);
@@ -56,6 +67,7 @@ class BASE_EXPORT SchedulerWorkerPoolParams final {
}
private:
+ // TODO(fdoray): Remove |name_| and |priority_hint_|. https://crbug.com/690706
std::string name_;
ThreadPriority priority_hint_;
StandbyThreadPolicy standby_thread_policy_;
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_worker_pool_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698