Chromium Code Reviews| 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_DATA_PROVIDER_H_ | |
| 6 #define COMPONENTS_METRICS_METRICS_DATA_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 // MetricsDataProvider is an interface allowing different parts of the UMA | |
| 17 // protos to be filled out by different classes. | |
| 18 class MetricsDataProvider { | |
| 19 public: | |
| 20 MetricsDataProvider() {} | |
| 21 virtual ~MetricsDataProvider() {} | |
| 22 | |
| 23 // Provides additional metrics into the system profile. Default implementation | |
| 24 // is a no-op. | |
|
Ilya Sherman
2014/05/19 16:05:53
nit: Probably no need to mention the default imple
Alexei Svitkine (slow)
2014/05/19 16:08:57
Done.
| |
| 25 virtual void ProvideSystemProfileMetrics( | |
| 26 SystemProfileProto* system_profile_proto) {} | |
| 27 | |
| 28 // Provides additional stability metrics. Stability metrics can be provided | |
| 29 // directly into |stability_proto| fields or by logging stability histograms | |
| 30 // via the UMA_STABILITY_HISTOGRAM_ENUMERATION() macro. | |
| 31 virtual void ProvideStabilityMetrics( | |
| 32 SystemProfileProto_Stability* stability_proto) {} | |
| 33 | |
| 34 // Provides general metrics that are neither system profile nor stability | |
| 35 // metrics. | |
| 36 virtual void ProvideGeneralMetrics( | |
| 37 ChromeUserMetricsExtension* uma_proto) {} | |
| 38 | |
| 39 private: | |
| 40 DISALLOW_COPY_AND_ASSIGN(MetricsDataProvider); | |
| 41 }; | |
| 42 | |
| 43 } // namespace metrics | |
| 44 | |
| 45 #endif // COMPONENTS_METRICS_METRICS_DATA_PROVIDER_H_ | |
| OLD | NEW |