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

Unified Diff: base/task_scheduler/scheduler_worker_pool_impl.h

Issue 2504443002: Cleanup: Move SchedulerWorkerPoolImpl ForTesting Methods to the Bottom of the Public Section (Closed)
Patch Set: Clang Format Is Now Enforced in Base Created 4 years, 1 month 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_impl.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_impl.h
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.h b/base/task_scheduler/scheduler_worker_pool_impl.h
index 136ad62335edf135e53978943d275cfea968baa7..178133daf6e7cedae0a0c01a7b64036d2341dbba 100644
--- a/base/task_scheduler/scheduler_worker_pool_impl.h
+++ b/base/task_scheduler/scheduler_worker_pool_impl.h
@@ -65,21 +65,6 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
TaskTracker* task_tracker,
DelayedTaskManager* delayed_task_manager);
- // Waits until all workers are idle.
- void WaitForAllWorkersIdleForTesting();
-
- // Joins all workers of this worker pool. Tasks that are already running are
- // allowed to complete their execution. This can only be called once.
- void JoinForTesting();
-
- // Disallows worker thread detachment. If the suggested reclaim time is not
- // TimeDelta::Max(), then the test should call this before the detach code can
- // run. The safest place to do this is before the a set of work is dispatched
- // (the worker pool is idle and steady state) or before the last
- // synchronization point for all workers (all threads are busy and can't be
- // reclaimed).
- void DisallowWorkerDetachmentForTesting();
-
// SchedulerWorkerPool:
scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(
const TaskTraits& traits) override;
@@ -106,6 +91,21 @@ class BASE_EXPORT SchedulerWorkerPoolImpl : public SchedulerWorkerPool {
void GetHistograms(std::vector<const HistogramBase*>* histograms) const;
+ // Waits until all workers are idle.
+ void WaitForAllWorkersIdleForTesting();
+
+ // Joins all workers of this worker pool. Tasks that are already running are
+ // allowed to complete their execution. This can only be called once.
+ void JoinForTesting();
+
+ // Disallows worker thread detachment. If the suggested reclaim time is not
+ // TimeDelta::Max(), then the test should call this before the detach code can
+ // run. The safest place to do this is before the a set of work is dispatched
+ // (the worker pool is idle and steady state) or before the last
+ // synchronization point for all workers (all threads are busy and can't be
+ // reclaimed).
+ void DisallowWorkerDetachmentForTesting();
+
private:
class SchedulerSingleThreadTaskRunner;
class SchedulerWorkerDelegateImpl;
« no previous file with comments | « no previous file | base/task_scheduler/scheduler_worker_pool_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698