OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 |
| 10 namespace metrics { |
| 11 |
| 12 class ChromeUserMetricsExtension; |
| 13 class SystemProfileProto; |
| 14 class SystemProfileProto_Stability; |
| 15 |
| 16 // MetricsProvider is an interface allowing different parts of the UMA protos to |
| 17 // be filled out by different classes. |
| 18 class MetricsProvider { |
| 19 public: |
| 20 MetricsProvider() {} |
| 21 virtual ~MetricsProvider() {} |
| 22 |
| 23 // Called when metrics recording has been enabled. |
| 24 virtual void OnRecordingEnabled() {} |
| 25 |
| 26 // Called when metrics recording has been disabled. |
| 27 virtual void OnRecordingDisabled() {} |
| 28 |
| 29 // Provides additional metrics into the system profile. |
| 30 virtual void ProvideSystemProfileMetrics( |
| 31 SystemProfileProto* system_profile_proto) {} |
| 32 |
| 33 // Provides additional stability metrics. Stability metrics can be provided |
| 34 // directly into |stability_proto| fields or by logging stability histograms |
| 35 // via the UMA_STABILITY_HISTOGRAM_ENUMERATION() macro. |
| 36 virtual void ProvideStabilityMetrics( |
| 37 SystemProfileProto_Stability* stability_proto) {} |
| 38 |
| 39 // Provides general metrics that are neither system profile nor stability |
| 40 // metrics. |
| 41 virtual void ProvideGeneralMetrics( |
| 42 ChromeUserMetricsExtension* uma_proto) {} |
| 43 |
| 44 private: |
| 45 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
| 46 }; |
| 47 |
| 48 } // namespace metrics |
| 49 |
| 50 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
OLD | NEW |