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

Unified Diff: base/task_scheduler/scheduler_thread_pool.h

Issue 1903103007: TaskScheduler: Make SchedulerWorkerThread own its delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sched_2b_remove_utils
Patch Set: Created 4 years, 8 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
Index: base/task_scheduler/scheduler_thread_pool.h
diff --git a/base/task_scheduler/scheduler_thread_pool.h b/base/task_scheduler/scheduler_thread_pool.h
index baf2386c0dcb4b2a74d96af2b53288531f5e8698..6cbf6f47411c2b590c7a9d085775b9146273881e 100644
--- a/base/task_scheduler/scheduler_thread_pool.h
+++ b/base/task_scheduler/scheduler_thread_pool.h
@@ -90,11 +90,12 @@ class BASE_EXPORT SchedulerThreadPool : public SchedulerThreadPoolInterface {
private:
class SchedulerWorkerThreadDelegateImpl;
- SchedulerThreadPool(const EnqueueSequenceCallback& enqueue_sequence_callback,
- TaskTracker* task_tracker,
+ SchedulerThreadPool(TaskTracker* task_tracker,
DelayedTaskManager* delayed_task_manager);
- bool Initialize(ThreadPriority thread_priority, size_t max_threads);
+ bool Initialize(ThreadPriority thread_priority,
+ size_t max_threads,
+ const EnqueueSequenceCallback& enqueue_sequence_callback);
// Wakes up the last thread from this thread pool to go idle, if any.
void WakeUpOneThread();
@@ -129,9 +130,6 @@ class BASE_EXPORT SchedulerThreadPool : public SchedulerThreadPoolInterface {
// Signaled once JoinForTesting() has returned.
WaitableEvent join_for_testing_returned_;
- // Delegate for all worker threads in this pool.
- std::unique_ptr<SchedulerWorkerThread::Delegate> worker_thread_delegate_;
-
TaskTracker* const task_tracker_;
DelayedTaskManager* const delayed_task_manager_;
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_thread_pool.cc » ('j') | base/task_scheduler/scheduler_worker_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698