| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/metrics/test_metrics_provider.h" | 5 #include "components/metrics/test_metrics_provider.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 | 8 |
| 9 namespace metrics { | 9 namespace metrics { |
| 10 | 10 |
| 11 void TestMetricsProvider::Init() { | 11 void TestMetricsProvider::Init() { |
| 12 init_called_ = true; | 12 init_called_ = true; |
| 13 } | 13 } |
| 14 | 14 |
| 15 void TestMetricsProvider::OnRecordingDisabled() { | 15 void TestMetricsProvider::OnRecordingDisabled() { |
| 16 on_recording_disabled_called_ = true; | 16 on_recording_disabled_called_ = true; |
| 17 } | 17 } |
| 18 | 18 |
| 19 bool TestMetricsProvider::HasInitialStabilityMetrics() { | 19 bool TestMetricsProvider::HasInitialStabilityMetrics() { |
| 20 has_initial_stability_metrics_called_ = true; |
| 20 return has_initial_stability_metrics_; | 21 return has_initial_stability_metrics_; |
| 21 } | 22 } |
| 22 | 23 |
| 23 void TestMetricsProvider::ProvideInitialStabilityMetrics( | 24 void TestMetricsProvider::ProvideInitialStabilityMetrics( |
| 24 SystemProfileProto* system_profile_proto) { | 25 SystemProfileProto* system_profile_proto) { |
| 25 UMA_STABILITY_HISTOGRAM_ENUMERATION("TestMetricsProvider.Initial", 1, 2); | 26 UMA_STABILITY_HISTOGRAM_ENUMERATION("TestMetricsProvider.Initial", 1, 2); |
| 26 provide_initial_stability_metrics_called_ = true; | 27 provide_initial_stability_metrics_called_ = true; |
| 27 } | 28 } |
| 28 | 29 |
| 29 void TestMetricsProvider::ProvideStabilityMetrics( | 30 void TestMetricsProvider::ProvideStabilityMetrics( |
| 30 SystemProfileProto* system_profile_proto) { | 31 SystemProfileProto* system_profile_proto) { |
| 31 UMA_STABILITY_HISTOGRAM_ENUMERATION("TestMetricsProvider.Regular", 1, 2); | 32 UMA_STABILITY_HISTOGRAM_ENUMERATION("TestMetricsProvider.Regular", 1, 2); |
| 32 provide_stability_metrics_called_ = true; | 33 provide_stability_metrics_called_ = true; |
| 33 } | 34 } |
| 34 | 35 |
| 35 } // namespace metrics | 36 } // namespace metrics |
| OLD | NEW |