| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 namespace metrics { | 10 namespace metrics { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 // Called when a new MetricsLog is created. | 23 // Called when a new MetricsLog is created. |
| 24 virtual void OnDidCreateMetricsLog(); | 24 virtual void OnDidCreateMetricsLog(); |
| 25 | 25 |
| 26 // Called when metrics recording has been enabled. | 26 // Called when metrics recording has been enabled. |
| 27 virtual void OnRecordingEnabled(); | 27 virtual void OnRecordingEnabled(); |
| 28 | 28 |
| 29 // Called when metrics recording has been disabled. | 29 // Called when metrics recording has been disabled. |
| 30 virtual void OnRecordingDisabled(); | 30 virtual void OnRecordingDisabled(); |
| 31 | 31 |
| 32 // Called right before metrics are uploaded. |
| 33 virtual void OnCollectFinalMetrics(); |
| 34 |
| 32 // Provides additional metrics into the system profile. | 35 // Provides additional metrics into the system profile. |
| 33 virtual void ProvideSystemProfileMetrics( | 36 virtual void ProvideSystemProfileMetrics( |
| 34 SystemProfileProto* system_profile_proto); | 37 SystemProfileProto* system_profile_proto); |
| 35 | 38 |
| 36 // Called once at startup to see whether this provider has stability events | 39 // Called once at startup to see whether this provider has stability events |
| 37 // to share. Default implementation always returns false. | 40 // to share. Default implementation always returns false. |
| 38 virtual bool HasStabilityMetrics(); | 41 virtual bool HasStabilityMetrics(); |
| 39 | 42 |
| 40 // Provides additional stability metrics. Stability metrics can be provided | 43 // Provides additional stability metrics. Stability metrics can be provided |
| 41 // directly into |stability_proto| fields or by logging stability histograms | 44 // directly into |stability_proto| fields or by logging stability histograms |
| (...skipping 10 matching lines...) Expand all Loading... |
| 52 virtual void ProvideGeneralMetrics( | 55 virtual void ProvideGeneralMetrics( |
| 53 ChromeUserMetricsExtension* uma_proto); | 56 ChromeUserMetricsExtension* uma_proto); |
| 54 | 57 |
| 55 private: | 58 private: |
| 56 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); | 59 DISALLOW_COPY_AND_ASSIGN(MetricsProvider); |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 } // namespace metrics | 62 } // namespace metrics |
| 60 | 63 |
| 61 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ | 64 #endif // COMPONENTS_METRICS_METRICS_PROVIDER_H_ |
| OLD | NEW |