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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // 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. |
64 // 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. |
65 virtual void ClearSavedStabilityMetrics(); | 65 virtual void ClearSavedStabilityMetrics(); |
66 | 66 |
67 // Provides general metrics that are neither system profile nor stability | 67 // Provides general metrics that are neither system profile nor stability |
68 // 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 |
69 // collected right before upload. | 69 // collected right before upload. |
70 virtual void ProvideGeneralMetrics( | 70 virtual void ProvideGeneralMetrics( |
71 ChromeUserMetricsExtension* uma_proto); | 71 ChromeUserMetricsExtension* uma_proto); |
72 | 72 |
| 73 // Called during regular collection to explicitly merge histogram deltas |
| 74 // to the global StatisticsRecorder. |
| 75 virtual void MergeHistogramDeltas(); |
| 76 |
73 // Called during regular collection to explicitly load histogram snapshots | 77 // Called during regular collection to explicitly load histogram snapshots |
74 // using a snapshot manager. PrepareDeltas() will have already been called | 78 // using a snapshot manager. PrepareDeltas() will have already been called |
75 // and FinishDeltas() will be called later; calls to only PrepareDelta(), | 79 // and FinishDeltas() will be called later; calls to only PrepareDelta(), |
76 // not PrepareDeltas (plural), should be made. | 80 // not PrepareDeltas (plural), should be made. |
77 virtual void RecordHistogramSnapshots( | 81 virtual void RecordHistogramSnapshots( |
78 base::HistogramSnapshotManager* snapshot_manager); | 82 base::HistogramSnapshotManager* snapshot_manager); |
79 | 83 |
80 // Called during collection of initial metrics to explicitly load histogram | 84 // Called during collection of initial metrics to explicitly load histogram |
81 // snapshots using a snapshot manager. PrepareDeltas() will have already | 85 // snapshots using a snapshot manager. PrepareDeltas() will have already |
82 // been called and FinishDeltas() will be called later; calls to only | 86 // been called and FinishDeltas() will be called later; calls to only |
83 // PrepareDelta(), not PrepareDeltas (plural), should be made. | 87 // PrepareDelta(), not PrepareDeltas (plural), should be made. |
84 virtual void RecordInitialHistogramSnapshots( | 88 virtual void RecordInitialHistogramSnapshots( |
85 base::HistogramSnapshotManager* snapshot_manager); | 89 base::HistogramSnapshotManager* snapshot_manager); |
86 | 90 |
87 private: | 91 private: |
88 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 92 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
89 }; | 93 }; |
90 | 94 |
91 } // namespace metrics | 95 } // namespace metrics |
92 | 96 |
93 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 97 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
OLD | NEW |