Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Side by Side Diff: components/metrics/test_metrics_provider.cc

Issue 1985733002: Always check if providers have initial stability metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed order of test expectations Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/metrics/test_metrics_provider.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « components/metrics/test_metrics_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698