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

Unified Diff: chrome/browser/ui/webui/app_launcher_login_handler.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/ui/webui/app_launcher_login_handler.cc
diff --git a/chrome/browser/ui/webui/app_launcher_login_handler.cc b/chrome/browser/ui/webui/app_launcher_login_handler.cc
index e003c093f575c610ee950b93a375913b82dc7414..f17b1182583cf8f43a7c90585274bc242596b37a 100644
--- a/chrome/browser/ui/webui/app_launcher_login_handler.cc
+++ b/chrome/browser/ui/webui/app_launcher_login_handler.cc
@@ -139,15 +139,9 @@ void AppLauncherLoginHandler::HandleShowSyncLoginUI(
RecordInHistogram(NTP_SIGN_IN_PROMO_CLICKED);
}
-void AppLauncherLoginHandler::RecordInHistogram(int type) {
- // Invalid type to record.
- if (type < NTP_SIGN_IN_PROMO_VIEWED ||
- type > NTP_SIGN_IN_PROMO_CLICKED) {
- NOTREACHED();
- } else {
- UMA_HISTOGRAM_ENUMERATION("SyncPromo.NTPPromo", type,
- NTP_SIGN_IN_PROMO_BUCKET_BOUNDARY);
- }
+void AppLauncherLoginHandler::RecordInHistogram(NTPSignInPromoBuckets type) {
+ UMA_HISTOGRAM_ENUMERATION("SyncPromo.NTPPromo", type,
+ NTP_SIGN_IN_PROMO_BUCKET_BOUNDARY);
}
void AppLauncherLoginHandler::HandleLoginMessageSeen(
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_login_handler.h ('k') | chrome/browser/ui/webui/signin/inline_login_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698