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

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

Issue 845003002: [chromecast] ExternalMetrics has to destroy itself in file thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: chromecast/browser/metrics/external_metrics.h
diff --git a/chromecast/browser/metrics/external_metrics.h b/chromecast/browser/metrics/external_metrics.h
index 47c74f3eebe26181148211fa67e87f84d529dee1..dd125e211b6609ea227e9415749edd3384c0b22c 100644
--- a/chromecast/browser/metrics/external_metrics.h
+++ b/chromecast/browser/metrics/external_metrics.h
@@ -24,13 +24,19 @@ class CastStabilityMetricsProvider;
class ExternalMetrics {
public:
explicit ExternalMetrics(CastStabilityMetricsProvider* stability_provider);
- ~ExternalMetrics();
// Begins external data collection. Calls to RecordAction originate in the
// File thread but are executed in the UI thread.
void Start();
+ // Destroys itself in appropriate thread.
+ void StopAndDestroy();
+
private:
+ friend class base::DeleteHelper<ExternalMetrics>;
+
+ ~ExternalMetrics();
+
// The max length of a message (name-value pair, plus header)
static const int kMetricsMessageMaxLength = 1024; // be generous
« no previous file with comments | « chromecast/browser/metrics/cast_metrics_service_client.cc ('k') | chromecast/browser/metrics/external_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698