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..788266fe98d78c38d56ecc52e92972415c666f6d 100644 |
--- a/base/task_scheduler/scheduler_worker_pool_params.h |
+++ b/base/task_scheduler/scheduler_worker_pool_params.h |
@@ -5,10 +5,7 @@ |
#ifndef BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ |
#define BASE_TASK_SCHEDULER_SCHEDULER_WORKER_POOL_PARAMS_H_ |
-#include <string> |
- |
#include "base/task_scheduler/scheduler_worker_params.h" |
-#include "base/threading/platform_thread.h" |
#include "base/time/time.h" |
namespace base { |
@@ -23,29 +20,28 @@ class BASE_EXPORT SchedulerWorkerPoolParams final { |
ONE, |
}; |
- // Construct a scheduler worker pool parameter object. |name| will be used to |
- // label the pool's threads ("TaskScheduler" + |name| + index) and histograms |
- // ("TaskScheduler." + histogram name + "." + |name| + extra suffixes). The |
- // pool will contain up to |max_threads|. |priority_hint| is the preferred |
- // thread priority; the actual thread priority depends on shutdown state and |
- // platform capabilities. |standby_thread_policy| indicates whether an idle |
+ // Constructs an invalid scheduler worker pool parameter object. |
+ SchedulerWorkerPoolParams(); |
+ |
+ // Constructs a scheduler worker pool parameter object. The pool will contain |
+ // up to |max_threads|. |standby_thread_policy| indicates whether an idle |
// thread should be kept alive on standby. |suggested_reclaim_time| sets a |
// 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. |
SchedulerWorkerPoolParams( |
- const std::string& name, |
- ThreadPriority priority_hint, |
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); |
- const std::string& name() const { return name_; } |
- ThreadPriority priority_hint() const { return priority_hint_; } |
+ // Returns true if this object can be used to initialize a worker pool. |
+ bool IsValid() const; |
+ |
StandbyThreadPolicy standby_thread_policy() const { |
return standby_thread_policy_; |
} |
@@ -56,8 +52,6 @@ class BASE_EXPORT SchedulerWorkerPoolParams final { |
} |
private: |
- std::string name_; |
- ThreadPriority priority_hint_; |
StandbyThreadPolicy standby_thread_policy_; |
size_t max_threads_; |
TimeDelta suggested_reclaim_time_; |