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 { | 10 namespace base { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Called to indicate that saved stability prefs should be cleared, e.g. | 69 // Called to indicate that saved stability prefs should be cleared, e.g. |
70 // because they are from an old version and should not be kept. | 70 // because they are from an old version and should not be kept. |
71 virtual void ClearSavedStabilityMetrics(); | 71 virtual void ClearSavedStabilityMetrics(); |
72 | 72 |
73 // Provides general metrics that are neither system profile nor stability | 73 // Provides general metrics that are neither system profile nor stability |
74 // metrics. May also be used to add histograms when final metrics are | 74 // metrics. May also be used to add histograms when final metrics are |
75 // collected right before upload. | 75 // collected right before upload. |
76 virtual void ProvideGeneralMetrics( | 76 virtual void ProvideGeneralMetrics( |
77 ChromeUserMetricsExtension* uma_proto); | 77 ChromeUserMetricsExtension* uma_proto); |
78 | 78 |
79 // Called during regular collection to explicitly merge histogram deltas | |
80 // to the global StatisticsRecorder. | |
81 virtual void MergeHistogramDeltas(); | |
82 | |
83 // Called during regular collection to explicitly load histogram snapshots | 79 // Called during regular collection to explicitly load histogram snapshots |
84 // using a snapshot manager. PrepareDeltas() will have already been called | 80 // using a snapshot manager. PrepareDeltas() will have already been called |
85 // and FinishDeltas() will be called later; calls to only PrepareDelta(), | 81 // and FinishDeltas() will be called later; calls to only PrepareDelta(), |
86 // not PrepareDeltas (plural), should be made. | 82 // not PrepareDeltas (plural), should be made. |
87 virtual void RecordHistogramSnapshots( | 83 virtual void RecordHistogramSnapshots( |
88 base::HistogramSnapshotManager* snapshot_manager); | 84 base::HistogramSnapshotManager* snapshot_manager); |
89 | 85 |
90 // Called during collection of initial metrics to explicitly load histogram | 86 // Called during collection of initial metrics to explicitly load histogram |
91 // snapshots using a snapshot manager. PrepareDeltas() will have already | 87 // snapshots using a snapshot manager. PrepareDeltas() will have already |
92 // been called and FinishDeltas() will be called later; calls to only | 88 // been called and FinishDeltas() will be called later; calls to only |
93 // PrepareDelta(), not PrepareDeltas (plural), should be made. | 89 // PrepareDelta(), not PrepareDeltas (plural), should be made. |
94 virtual void RecordInitialHistogramSnapshots( | 90 virtual void RecordInitialHistogramSnapshots( |
95 base::HistogramSnapshotManager* snapshot_manager); | 91 base::HistogramSnapshotManager* snapshot_manager); |
96 | 92 |
97 private: | 93 private: |
98 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 94 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
99 }; | 95 }; |
100 | 96 |
101 } // namespace metrics | 97 } // namespace metrics |
102 | 98 |
103 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 99 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
OLD | NEW |