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

Unified Diff: ash/metrics/user_metrics_recorder.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 | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/metrics/user_metrics_recorder.cc
diff --git a/ash/metrics/user_metrics_recorder.cc b/ash/metrics/user_metrics_recorder.cc
index 0bf56ddc27b7abdb42b2481535ec875ca0bf5421..36ce870f935b389dbd452fd07dfefc15f9c08878 100644
--- a/ash/metrics/user_metrics_recorder.cc
+++ b/ash/metrics/user_metrics_recorder.cc
@@ -550,10 +550,11 @@ void UserMetricsRecorder::RecordPeriodicMetrics() {
if (shelf) {
// TODO(bruthig): Consider tracking the time spent in each alignment.
UMA_HISTOGRAM_ENUMERATION("Ash.ShelfAlignmentOverTime",
- shelf->SelectValueForShelfAlignment(
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM,
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT,
- SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT),
+ static_cast<ShelfAlignmentUmaEnumValue>(
+ shelf->SelectValueForShelfAlignment(
+ SHELF_ALIGNMENT_UMA_ENUM_VALUE_BOTTOM,
+ SHELF_ALIGNMENT_UMA_ENUM_VALUE_LEFT,
+ SHELF_ALIGNMENT_UMA_ENUM_VALUE_RIGHT)),
SHELF_ALIGNMENT_UMA_ENUM_VALUE_COUNT);
}
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698