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

Unified Diff: base/timer/timer.h

Issue 2958003002: Expose Timer::AbandonAndStop, so it can safely be destroyed on another thread. (Closed)
Patch Set: Removed AbandonAndStop and made Stop abandon. Created 3 years, 6 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/timer/timer.cc » ('j') | base/timer/timer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer/timer.h
diff --git a/base/timer/timer.h b/base/timer/timer.h
index 651ba39d9137d2a3814fe6859d6dce953aef994e..cd1fc5d122722c778c1700255cef91e55161cf0e 100644
--- a/base/timer/timer.h
+++ b/base/timer/timer.h
@@ -123,7 +123,7 @@ class BASE_EXPORT Timer {
const base::Closure& user_task);
// Call this method to stop and cancel the timer. It is a no-op if the timer
- // is not running.
+ // is not running. Abandons any scheduled task.
virtual void Stop();
// Call this method to reset the timer delay. The |user_task_| must be set. If
@@ -166,14 +166,6 @@ class BASE_EXPORT Timer {
// Called by BaseTimerTaskInternal when the delayed task fires.
void RunScheduledTask();
- // Stop running task (if any) and abandon scheduled task (if any).
- void AbandonAndStop() {
- AbandonScheduledTask();
-
- Stop();
- // No more member accesses here: |this| could be deleted at this point.
- }
-
// When non-null, the |scheduled_task_| was posted to call RunScheduledTask()
// at |scheduled_run_time_|.
BaseTimerTaskInternal* scheduled_task_;
« no previous file with comments | « no previous file | base/timer/timer.cc » ('j') | base/timer/timer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698