| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 5 #ifndef COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 6 #define COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 | 9 |
| 10 namespace base { |
| 11 class HistogramSnapshotManager; |
| 12 } // namespace base |
| 13 |
| 10 namespace metrics { | 14 namespace metrics { |
| 11 | 15 |
| 12 class ChromeUserMetricsExtension; | 16 class ChromeUserMetricsExtension; |
| 13 class SystemProfileProto; | 17 class SystemProfileProto; |
| 14 class SystemProfileProto_Stability; | 18 class SystemProfileProto_Stability; |
| 15 | 19 |
| 16 // MetricsProvider is an interface allowing different parts of the UMA protos to | 20 // MetricsProvider is an interface allowing different parts of the UMA protos to |
| 17 // be filled out by different classes. | 21 // be filled out by different classes. |
| 18 class MetricsProvider { | 22 class MetricsProvider { |
| 19 public: | 23 public: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Called to indicate that saved stability prefs should be cleared, e.g. | 63 // Called to indicate that saved stability prefs should be cleared, e.g. |
| 60 // because they are from an old version and should not be kept. | 64 // because they are from an old version and should not be kept. |
| 61 virtual void ClearSavedStabilityMetrics(); | 65 virtual void ClearSavedStabilityMetrics(); |
| 62 | 66 |
| 63 // Provides general metrics that are neither system profile nor stability | 67 // Provides general metrics that are neither system profile nor stability |
| 64 // metrics. May also be used to add histograms when final metrics are | 68 // metrics. May also be used to add histograms when final metrics are |
| 65 // collected right before upload. | 69 // collected right before upload. |
| 66 virtual void ProvideGeneralMetrics( | 70 virtual void ProvideGeneralMetrics( |
| 67 ChromeUserMetricsExtension* uma_proto); | 71 ChromeUserMetricsExtension* uma_proto); |
| 68 | 72 |
| 73 // Called during collection to explicitly load histogram snapshots using a |
| 74 // snapshot manager. PrepareDeltas() will have already been called and |
| 75 // FinishDeltas() will be called later; calls to only PrepareDelta(), not |
| 76 // PrepareDeltas (plural), should be made. |
| 77 virtual void RecordHistogramSnapshots( |
| 78 base::HistogramSnapshotManager* snapshot_manager); |
| 79 |
| 69 private: | 80 private: |
| 70 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 81 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
| 71 }; | 82 }; |
| 72 | 83 |
| 73 } // namespace metrics | 84 } // namespace metrics |
| 74 | 85 |
| 75 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 86 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| OLD | NEW |