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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 // Called to indicate that saved stability prefs should be cleared, e.g. | 60 // Called to indicate that saved stability prefs should be cleared, e.g. |
57 // because they are from an old version and should not be kept. | 61 // because they are from an old version and should not be kept. |
58 virtual void ClearSavedStabilityMetrics(); | 62 virtual void ClearSavedStabilityMetrics(); |
59 | 63 |
60 // Provides general metrics that are neither system profile nor stability | 64 // Provides general metrics that are neither system profile nor stability |
61 // metrics. May also be used to add histograms when final metrics are | 65 // metrics. May also be used to add histograms when final metrics are |
62 // collected right before upload. | 66 // collected right before upload. |
63 virtual void ProvideGeneralMetrics( | 67 virtual void ProvideGeneralMetrics( |
64 ChromeUserMetricsExtension* uma_proto); | 68 ChromeUserMetricsExtension* uma_proto); |
65 | 69 |
70 // Called during collection to explicitly load histogram snapshots using a | |
71 // snapshot manager. PrepareDeltas() will have already been called and | |
72 // FinishDeltas() will be called later; calls to only PrepareDelta(), not | |
73 // PrepareDeltas (plural), should be made. | |
74 virtual void RecordHistogramSnapshots(base::HistogramSnapshotManager* hsm); | |
Alexei Svitkine (slow)
2016/02/17 21:55:36
Nit: snapshot_manager
bcwhite
2016/02/18 01:46:57
Done.
| |
75 | |
66 private: | 76 private: |
67 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 77 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
68 }; | 78 }; |
69 | 79 |
70 } // namespace metrics | 80 } // namespace metrics |
71 | 81 |
72 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 82 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
OLD | NEW |