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

Unified Diff: ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm

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 | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | ios/chrome/browser/ui/sync/sync_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm
diff --git a/ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm b/ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm
index a776d8785a661050fca6702e0ddf82ca06a4f92c..ae11ce9ce4bed8dd337574cb0178b6b5dc9ebdc6 100644
--- a/ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm
+++ b/ios/chrome/browser/ui/contextual_search/contextual_search_metrics.mm
@@ -27,7 +27,7 @@ using ContextualSearch::StateChangeReason;
#define LOGGED_UMA_HISTOGRAM_ENUMERATION(name, sample, boundary, log_level) \
{ \
- int evaluated_sample = sample; \
+ auto evaluated_sample = static_cast<decltype(boundary)>(sample); \
VLOG_UMA_HISTOGRAM_ENUMERATION(log_level, name, evaluated_sample); \
UMA_HISTOGRAM_ENUMERATION(name, evaluated_sample, boundary); \
}
« no previous file with comments | « ios/chrome/browser/ui/browser_view_controller.mm ('k') | ios/chrome/browser/ui/sync/sync_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698