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

Unified Diff: base/timer.h

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 | « no previous file | base/timer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/timer.h
diff --git a/base/timer.h b/base/timer.h
index 4f443a2348e6b05d22cc91ff5b131938231b04c1..0df026c999538bd36e69451f8fe78572e487d00c 100644
--- a/base/timer.h
+++ b/base/timer.h
@@ -50,7 +50,6 @@
#include "base/base_export.h"
#include "base/location.h"
#include "base/logging.h"
-#include "base/task.h"
#include "base/time.h"
class MessageLoop;
@@ -86,7 +85,7 @@ class BASE_EXPORT BaseTimer_Helper {
BaseTimer_Helper() : delayed_task_(NULL) {}
// We have access to the timer_ member so we can orphan this task.
- class TimerTask : public Task {
+ class TimerTask {
public:
TimerTask(const tracked_objects::Location& posted_from,
TimeDelta delay)
@@ -95,6 +94,7 @@ class BASE_EXPORT BaseTimer_Helper {
delay_(delay) {
}
virtual ~TimerTask() {}
+ virtual void Run() = 0;
tracked_objects::Location posted_from_;
BaseTimer_Helper* timer_;
TimeDelta delay_;
@@ -170,7 +170,7 @@ class BaseTimer : public BaseTimer_Helper {
ResetBaseTimer();
else
ClearBaseTimer();
- DispatchToMethod(receiver_, method_, Tuple0());
+ (receiver_->*method_)();
}
TimerTask* Clone() const {
« no previous file with comments | « no previous file | base/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698