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

Unified Diff: chrome/browser/prerender/prerender_link_manager.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 | « chrome/browser/policy/cloud/cloud_policy_invalidator.cc ('k') | chrome/browser/ui/toolbar/app_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_link_manager.cc
diff --git a/chrome/browser/prerender/prerender_link_manager.cc b/chrome/browser/prerender/prerender_link_manager.cc
index e54068de7cf91f6c489d271c538c0dcac6c5815c..1044220b7da8c0f16d819878a6bdeba7d49748e9 100644
--- a/chrome/browser/prerender/prerender_link_manager.cc
+++ b/chrome/browser/prerender/prerender_link_manager.cc
@@ -74,13 +74,15 @@ enum RelTypeHistogramEnum {
};
void RecordLinkManagerAdded(const uint32_t rel_types) {
- const uint32_t enum_value = rel_types & (RelTypeHistogramEnumMax - 1);
+ const RelTypeHistogramEnum enum_value = static_cast<RelTypeHistogramEnum>(
+ rel_types & (RelTypeHistogramEnumMax - 1));
UMA_HISTOGRAM_ENUMERATION("Prerender.RelTypesLinkAdded", enum_value,
RelTypeHistogramEnumMax);
}
void RecordLinkManagerStarting(const uint32_t rel_types) {
- const uint32_t enum_value = rel_types & (RelTypeHistogramEnumMax - 1);
+ const RelTypeHistogramEnum enum_value = static_cast<RelTypeHistogramEnum>(
+ rel_types & (RelTypeHistogramEnumMax - 1));
UMA_HISTOGRAM_ENUMERATION("Prerender.RelTypesLinkStarted", enum_value,
RelTypeHistogramEnumMax);
}
« no previous file with comments | « chrome/browser/policy/cloud/cloud_policy_invalidator.cc ('k') | chrome/browser/ui/toolbar/app_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698