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 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 // Called when a new MetricsLog is created. | 30 // Called when a new MetricsLog is created. |
31 virtual void OnDidCreateMetricsLog(); | 31 virtual void OnDidCreateMetricsLog(); |
32 | 32 |
33 // Called when metrics recording has been enabled. | 33 // Called when metrics recording has been enabled. |
34 virtual void OnRecordingEnabled(); | 34 virtual void OnRecordingEnabled(); |
35 | 35 |
36 // Called when metrics recording has been disabled. | 36 // Called when metrics recording has been disabled. |
37 virtual void OnRecordingDisabled(); | 37 virtual void OnRecordingDisabled(); |
38 | 38 |
39 // Called when the application is going into background mode, on platforms | |
40 // where applications may be killed when going into the background (Android, | |
41 // iOS). Providers that buffer histogram data in memory should persist | |
42 // histograms in this callback or in the subsequent Provide* callbacks, as the | |
43 // application may be killed without further notification after this callback. | |
Alexei Svitkine (slow)
2016/07/27 17:41:11
This seems OK for now, but note that we do have pl
Bryan McQuade
2016/07/27 18:25:15
Yeah - I think any subsystem that does buffering i
| |
44 virtual void OnAppEnterBackground(); | |
45 | |
39 // Provides additional metrics into the system profile. | 46 // Provides additional metrics into the system profile. |
40 virtual void ProvideSystemProfileMetrics( | 47 virtual void ProvideSystemProfileMetrics( |
41 SystemProfileProto* system_profile_proto); | 48 SystemProfileProto* system_profile_proto); |
42 | 49 |
43 // Called once at startup to see whether this provider has critical stability | 50 // Called once at startup to see whether this provider has critical stability |
44 // events to share in an initial stability log. | 51 // events to share in an initial stability log. |
45 // Returning true can trigger ProvideInitialStabilityMetrics and | 52 // Returning true can trigger ProvideInitialStabilityMetrics and |
46 // ProvideStabilityMetrics on all other registered metrics providers. | 53 // ProvideStabilityMetrics on all other registered metrics providers. |
47 // Default implementation always returns false. | 54 // Default implementation always returns false. |
48 virtual bool HasInitialStabilityMetrics(); | 55 virtual bool HasInitialStabilityMetrics(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 virtual void RecordInitialHistogramSnapshots( | 95 virtual void RecordInitialHistogramSnapshots( |
89 base::HistogramSnapshotManager* snapshot_manager); | 96 base::HistogramSnapshotManager* snapshot_manager); |
90 | 97 |
91 private: | 98 private: |
92 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 99 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
93 }; | 100 }; |
94 | 101 |
95 } // namespace metrics | 102 } // namespace metrics |
96 | 103 |
97 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 104 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
OLD | NEW |