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

Unified Diff: chrome/browser/metrics/android_metrics_provider.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/android_metrics_provider.cc
diff --git a/chrome/browser/metrics/android_metrics_provider.cc b/chrome/browser/metrics/android_metrics_provider.cc
index 79847f4c9b7d58d2c6efc39178a69c3daaf5154b..d199a3586cfd5e45e18e9e5110ccfa87f9365480 100644
--- a/chrome/browser/metrics/android_metrics_provider.cc
+++ b/chrome/browser/metrics/android_metrics_provider.cc
@@ -144,14 +144,15 @@ void AndroidMetricsProvider::ConvertStabilityPrefsToHistograms() {
for (int count = 0; count < launch_count; ++count) {
UMA_STABILITY_HISTOGRAM_ENUMERATION(
"Chrome.Android.Activity.LaunchCounts",
- activity_type,
+ static_cast<ActivityTypeIds::Type>(activity_type),
ActivityTypeIds::ACTIVITY_MAX_VALUE);
}
for (int count = 0; count < crash_count; ++count) {
- UMA_STABILITY_HISTOGRAM_ENUMERATION("Chrome.Android.Activity.CrashCounts",
- activity_type,
- ActivityTypeIds::ACTIVITY_MAX_VALUE);
+ UMA_STABILITY_HISTOGRAM_ENUMERATION(
+ "Chrome.Android.Activity.CrashCounts",
+ static_cast<ActivityTypeIds::Type>(activity_type),
+ ActivityTypeIds::ACTIVITY_MAX_VALUE);
}
}

Powered by Google App Engine
This is Rietveld 408576698