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

Unified Diff: components/metrics/metrics_reporting_scheduler.h

Issue 2590013002: Allow MetricsReportingScheduler's histograms to be overriden. (Closed)
Patch Set: Created 4 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 | components/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_reporting_scheduler.h
diff --git a/components/metrics/metrics_reporting_scheduler.h b/components/metrics/metrics_reporting_scheduler.h
index f4e3dd11b3cf9baea7a87e5603b6fbd5d6bd98c4..04173f75bdaac803b727e7cd22207960e0c1059b 100644
--- a/components/metrics/metrics_reporting_scheduler.h
+++ b/components/metrics/metrics_reporting_scheduler.h
@@ -24,7 +24,7 @@ class MetricsReportingScheduler {
MetricsReportingScheduler(
const base::Closure& upload_callback,
const base::Callback<base::TimeDelta(void)>& upload_interval_callback);
- ~MetricsReportingScheduler();
+ virtual ~MetricsReportingScheduler();
// Starts scheduling uploads. This in a no-op if the scheduler is already
// running, so it is safe to call more than once.
@@ -46,7 +46,20 @@ class MetricsReportingScheduler {
// Sets the upload interval to a specific value, exposed for unit tests.
void SetUploadIntervalForTesting(base::TimeDelta interval);
+ protected:
+ enum InitSequence {
+ TIMER_FIRED_FIRST,
+ INIT_TASK_COMPLETED_FIRST,
+ INIT_SEQUENCE_ENUM_SIZE,
+ };
+
private:
+ // Record the init sequence order histogram.
+ virtual void LogMetricsInitSequence(InitSequence sequence);
+
+ // Record the upload interval time.
+ virtual void LogActualUploadInterval(base::TimeDelta interval);
+
// Timer callback indicating it's time for the MetricsService to upload
// metrics.
void TriggerUpload();
« no previous file with comments | « no previous file | components/metrics/metrics_reporting_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698