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

Unified Diff: chrome/browser/android/metrics/launch_metrics.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
« no previous file with comments | « base/metrics/histogram_unittest.nc ('k') | chrome/browser/captive_portal/captive_portal_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/metrics/launch_metrics.cc
diff --git a/chrome/browser/android/metrics/launch_metrics.cc b/chrome/browser/android/metrics/launch_metrics.cc
index a44f9e3285fcf5327da8e40132caaf472ee1f9cc..c4b0378ec1f3f3a84c2cfa9dcc761afd686ec5a6 100644
--- a/chrome/browser/android/metrics/launch_metrics.cc
+++ b/chrome/browser/android/metrics/launch_metrics.cc
@@ -99,14 +99,15 @@ static void RecordLaunch(JNIEnv* env,
break;
}
- UMA_HISTOGRAM_ENUMERATION("Launch.HomeScreenSource", histogram_source,
+ UMA_HISTOGRAM_ENUMERATION("Launch.HomeScreenSource",
+ static_cast<ShortcutInfo::Source>(histogram_source),
ShortcutInfo::SOURCE_COUNT);
rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
rappor_metric_source, url);
- int action = standalone ? HOME_SCREEN_LAUNCH_STANDALONE
- : HOME_SCREEN_LAUNCH_SHORTCUT;
+ HomeScreenLaunch action =
+ standalone ? HOME_SCREEN_LAUNCH_STANDALONE : HOME_SCREEN_LAUNCH_SHORTCUT;
std::string rappor_metric_action = standalone ? "Launch.HomeScreen.Standalone"
: "Launch.HomeScreen.Shortcut";
« no previous file with comments | « base/metrics/histogram_unittest.nc ('k') | chrome/browser/captive_portal/captive_portal_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698