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

Unified Diff: chrome/browser/metrics/metrics_reporting_scheduler.h

Issue 7001003: Switch MetricsReportingScheduler to using an actual timer object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating to trunk Created 8 years, 10 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 | chrome/browser/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_reporting_scheduler.h
diff --git a/chrome/browser/metrics/metrics_reporting_scheduler.h b/chrome/browser/metrics/metrics_reporting_scheduler.h
index 7040bbb2868e02f370394ec76d579c2f45761e79..5eb89954507170ef00cb0d8e29bc439fa9c4433a 100644
--- a/chrome/browser/metrics/metrics_reporting_scheduler.h
+++ b/chrome/browser/metrics/metrics_reporting_scheduler.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/time.h"
+#include "base/timer.h"
// Scheduler task to drive a MetricsService object's uploading.
class MetricsReportingScheduler {
@@ -46,7 +47,7 @@ class MetricsReportingScheduler {
// The MetricsService method to call when uploading should happen.
base::Closure upload_callback_;
- base::WeakPtrFactory<MetricsReportingScheduler> weak_ptr_factory_;
+ base::OneShotTimer<MetricsReportingScheduler> upload_timer_;
// The interval between being told an upload is done and starting the next
// upload.
@@ -56,10 +57,6 @@ class MetricsReportingScheduler {
// more recently than Stop).
bool running_;
- // Indicates that a timer for triggering the next upload has already been
- // started.
- bool timer_pending_;
-
// Indicates that the last triggered upload hasn't resolved yet.
bool callback_pending_;
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698