Index: base/task_scheduler/task_tracker.h |
diff --git a/base/task_scheduler/task_tracker.h b/base/task_scheduler/task_tracker.h |
index fc0901f7c139ade379e6e334a3aa7603efec7b49..609edbc07f35f068173ef643c8684e1226b4230c 100644 |
--- a/base/task_scheduler/task_tracker.h |
+++ b/base/task_scheduler/task_tracker.h |
@@ -44,12 +44,17 @@ class BASE_EXPORT TaskTracker { |
// must have allowed |task| to be posted. |
void RunTask(const Task* task); |
- // Returns true if shutdown has completed. |
+ // Returns true once shutdown has started (Shutdown() has been called but |
+ // might not have returned). |
+ bool HasShutdownStarted() const; |
+ |
+ // Returns true if shutdown has completed (Shutdown() has returned). |
bool IsShutdownComplete() const; |
- // Returns true while shutdown is in progress (i.e. Shutdown() has been called |
- // but hasn't returned). |
- bool IsShuttingDownForTesting() const; |
+ // Causes HasShutdownStarted() to return true. Unlike when Shutdown() returns, |
+ // IsShutdownComplete() won't return true after this returns. Shutdown() |
+ // cannot be called after this. |
+ void SetHasShutdownStartedForTesting(); |
private: |
class State; |