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

Unified Diff: components/metrics/metrics_data_provider.h

Issue 296483004: Introduce a MetricsDataProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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: components/metrics/metrics_data_provider.h
===================================================================
--- components/metrics/metrics_data_provider.h (revision 0)
+++ components/metrics/metrics_data_provider.h (working copy)
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_METRICS_METRICS_DATA_PROVIDER_H_
+#define COMPONENTS_METRICS_METRICS_DATA_PROVIDER_H_
+
+#include "base/basictypes.h"
+
+namespace metrics {
+
+class ChromeUserMetricsExtension;
+class SystemProfileProto;
+class SystemProfileProto_Stability;
+
+// MetricsDataProvider is an interface allowing different parts of the UMA
+// protos to be filled out by different classes.
+class MetricsDataProvider {
+ public:
+ MetricsDataProvider();
+ virtual ~MetricsDataProvider();
+
+ // Provides additional metrics into the system profile. Default implementation
+ // is a no-op.
+ virtual void ProvideSystemProfileMetrics(
+ SystemProfileProto* system_profile_proto);
+
+ // 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_Stability* stability_proto);
+
+ // Provides general metrics that are neither system profile or stability
Ilya Sherman 2014/05/19 14:45:00 nit: "or" -> "nor"
Alexei Svitkine (slow) 2014/05/19 15:23:02 Done.
+ // metrics.
+ virtual void ProvideGeneralMetrics(
+ ChromeUserMetricsExtension* uma_proto);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MetricsDataProvider);
+};
+
+} // namespace metrics
+
+#endif // COMPONENTS_METRICS_METRICS_DATA_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698