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 #include "chrome/browser/metrics/android_metrics_provider.h" | 5 #include "chrome/browser/metrics/android_metrics_provider.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/android/feature_utilities.h" | 10 #include "chrome/browser/android/feature_utilities.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ++activity_type) { | 137 ++activity_type) { |
138 int launch_count = 0; | 138 int launch_count = 0; |
139 int crash_count = 0; | 139 int crash_count = 0; |
140 | 140 |
141 launch_counts->GetInteger(activity_type, &launch_count); | 141 launch_counts->GetInteger(activity_type, &launch_count); |
142 crash_counts->GetInteger(activity_type, &crash_count); | 142 crash_counts->GetInteger(activity_type, &crash_count); |
143 | 143 |
144 for (int count = 0; count < launch_count; ++count) { | 144 for (int count = 0; count < launch_count; ++count) { |
145 UMA_STABILITY_HISTOGRAM_ENUMERATION( | 145 UMA_STABILITY_HISTOGRAM_ENUMERATION( |
146 "Chrome.Android.Activity.LaunchCounts", | 146 "Chrome.Android.Activity.LaunchCounts", |
147 activity_type, | 147 static_cast<ActivityTypeIds::Type>(activity_type), |
148 ActivityTypeIds::ACTIVITY_MAX_VALUE); | 148 ActivityTypeIds::ACTIVITY_MAX_VALUE); |
149 } | 149 } |
150 | 150 |
151 for (int count = 0; count < crash_count; ++count) { | 151 for (int count = 0; count < crash_count; ++count) { |
152 UMA_STABILITY_HISTOGRAM_ENUMERATION("Chrome.Android.Activity.CrashCounts", | 152 UMA_STABILITY_HISTOGRAM_ENUMERATION( |
153 activity_type, | 153 "Chrome.Android.Activity.CrashCounts", |
154 ActivityTypeIds::ACTIVITY_MAX_VALUE); | 154 static_cast<ActivityTypeIds::Type>(activity_type), |
| 155 ActivityTypeIds::ACTIVITY_MAX_VALUE); |
155 } | 156 } |
156 } | 157 } |
157 | 158 |
158 launch_counts->Clear(); | 159 launch_counts->Clear(); |
159 crash_counts->Clear(); | 160 crash_counts->Clear(); |
160 } | 161 } |
OLD | NEW |