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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_launch_error.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/chromeos/app_mode/kiosk_app_launch_error.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc b/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc
index 15f52fd68ec46e0ddc5484f014a973c24695bdb8..60dda32264250047169b3c8bb85ee53ae331011f 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc
@@ -102,14 +102,16 @@ void KioskAppLaunchError::RecordMetricAndClear() {
int error;
if (dict_update->GetInteger(kKeyLaunchError, &error))
- UMA_HISTOGRAM_ENUMERATION("Kiosk.Launch.Error", error, ERROR_COUNT);
+ UMA_HISTOGRAM_ENUMERATION("Kiosk.Launch.Error", static_cast<Error>(error),
+ ERROR_COUNT);
dict_update->Remove(kKeyLaunchError, NULL);
int cryptohome_failure;
if (dict_update->GetInteger(kKeyCryptohomeFailure, &cryptohome_failure)) {
- UMA_HISTOGRAM_ENUMERATION("Kiosk.Launch.CryptohomeFailure",
- cryptohome_failure,
- AuthFailure::NUM_FAILURE_REASONS);
+ UMA_HISTOGRAM_ENUMERATION(
+ "Kiosk.Launch.CryptohomeFailure",
+ static_cast<AuthFailure::FailureReason>(cryptohome_failure),
+ AuthFailure::NUM_FAILURE_REASONS);
}
dict_update->Remove(kKeyCryptohomeFailure, NULL);
}
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_service.cc ('k') | chrome/browser/chromeos/login/reauth_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698