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

Unified Diff: chromecast/browser/metrics/external_metrics.h

Issue 2955953002: [Cleanup] Migrate ExternalMetrics to use the Task Scheduler. (Closed)
Patch Set: Use a custom sequenced task runner 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 | chromecast/browser/metrics/external_metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/metrics/external_metrics.h
diff --git a/chromecast/browser/metrics/external_metrics.h b/chromecast/browser/metrics/external_metrics.h
index 9e48da4902df63bf4d00798769f290ef1606d997..79cf6f7584b9b6abeaefd508ad1ee5d8ea24050c 100644
--- a/chromecast/browser/metrics/external_metrics.h
+++ b/chromecast/browser/metrics/external_metrics.h
@@ -10,6 +10,7 @@
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/sequence_checker.h"
#include "base/sequenced_task_runner_helpers.h"
namespace metrics {
@@ -62,12 +63,20 @@ class ExternalMetrics {
// Calls CollectEvents and reschedules a future collection.
void CollectEventsAndReschedule();
+ // Schedules a future collection.
+ void ScheduleCollection();
+
// Reference to stability metrics provider, for reporting external crashes.
CastStabilityMetricsProvider* const stability_provider_;
// File used by libmetrics to send metrics to the browser process.
const std::string uma_events_file_;
+ // The task runner used for running background tasks.
+ scoped_refptr<base::SequencedTaskRunner> task_runner_;
+
+ SEQUENCE_CHECKER(sequence_checker_);
+
base::WeakPtrFactory<ExternalMetrics> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ExternalMetrics);
« no previous file with comments | « no previous file | chromecast/browser/metrics/external_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698