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

Unified Diff: components/metrics/metrics_provider.h

Issue 558653002: Allow MetricsProviders to request an initial stability log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Move all MetricsProvider implementation to .cc file. Created 6 years, 3 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 | « components/metrics/BUILD.gn ('k') | components/metrics/metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_provider.h
diff --git a/components/metrics/metrics_provider.h b/components/metrics/metrics_provider.h
index 001e66a42c6330f55a673840983bf24570454c97..abfbc6f63f55d0be929d11d73d5d48b8350db1f2 100644
--- a/components/metrics/metrics_provider.h
+++ b/components/metrics/metrics_provider.h
@@ -17,32 +17,36 @@ class SystemProfileProto_Stability;
// be filled out by different classes.
class MetricsProvider {
public:
- MetricsProvider() {}
- virtual ~MetricsProvider() {}
+ MetricsProvider();
+ virtual ~MetricsProvider();
// Called when a new MetricsLog is created.
- virtual void OnDidCreateMetricsLog() {}
+ virtual void OnDidCreateMetricsLog();
// Called when metrics recording has been enabled.
- virtual void OnRecordingEnabled() {}
+ virtual void OnRecordingEnabled();
// Called when metrics recording has been disabled.
- virtual void OnRecordingDisabled() {}
+ virtual void OnRecordingDisabled();
// Provides additional metrics into the system profile.
virtual void ProvideSystemProfileMetrics(
- SystemProfileProto* system_profile_proto) {}
+ SystemProfileProto* system_profile_proto);
+
+ // Called once at startup to see whether this provider has stability events
+ // to share. Default implementation always returns false.
+ virtual bool HasStabilityMetrics();
// Provides additional stability metrics. Stability metrics can be provided
// directly into |stability_proto| fields or by logging stability histograms
// via the UMA_STABILITY_HISTOGRAM_ENUMERATION() macro.
virtual void ProvideStabilityMetrics(
- SystemProfileProto* system_profile_proto) {}
+ SystemProfileProto* system_profile_proto);
// Provides general metrics that are neither system profile nor stability
// metrics.
virtual void ProvideGeneralMetrics(
- ChromeUserMetricsExtension* uma_proto) {}
+ ChromeUserMetricsExtension* uma_proto);
private:
DISALLOW_COPY_AND_ASSIGN(MetricsProvider);
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698