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

Unified Diff: base/timer.cc

Issue 8898019: Remove Task inheritance from base::Timer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 9 years 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 | « base/timer.h ('k') | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer.cc
diff --git a/base/timer.cc b/base/timer.cc
index 8c06693a6c9ae2bff1b63260bb903a3f0df9de13..148a9ced83b7df656395c3e09d8bdba7b3f19b8b 100644
--- a/base/timer.cc
+++ b/base/timer.cc
@@ -4,6 +4,8 @@
#include "base/timer.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/message_loop.h"
namespace base {
@@ -21,7 +23,8 @@ void BaseTimer_Helper::InitiateDelayedTask(TimerTask* timer_task) {
delayed_task_ = timer_task;
delayed_task_->timer_ = this;
MessageLoop::current()->PostDelayedTask(
- timer_task->posted_from_, timer_task,
+ timer_task->posted_from_,
+ base::Bind(&TimerTask::Run, base::Owned(timer_task)),
static_cast<int>(timer_task->delay_.InMillisecondsRoundedUp()));
}
« no previous file with comments | « base/timer.h ('k') | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698