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

Unified Diff: base/metrics/histogram_macros.h

Issue 2261793002: Bring the feedback button to the Mac sad tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Ditch a pointless |explicit|, add a comment on SadTabView ownership. Created 4 years, 4 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 | base/template_util.h » ('j') | base/template_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_macros.h
diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h
index dcde7255c8dafee8e28c09e21baf492408ea8682..d3a16eb6cbb1979b0efa7bf4280fd465e37809b0 100644
--- a/base/metrics/histogram_macros.h
+++ b/base/metrics/histogram_macros.h
@@ -8,6 +8,7 @@
#include "base/atomicops.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
+#include "base/template_util.h"
#include "base/time/time.h"
// Macros for efficient use of histograms. See documentation in histogram.h.
@@ -149,9 +150,11 @@
// values >= boundary_value so that mistakes in calling the UMA enumeration
// macros can be detected.
#define HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \
- STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
- base::LinearHistogram::FactoryGet(name, 1, boundary, boundary + 1, \
- flag))
+ STATIC_HISTOGRAM_POINTER_BLOCK( \
+ name, Add(base::underlying_value(sample)), \
+ base::LinearHistogram::FactoryGet( \
+ name, 1, base::underlying_value(boundary), \
+ base::underlying_value(boundary) + 1, flag))
#define LOCAL_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
LOCAL_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
« no previous file with comments | « no previous file | base/template_util.h » ('j') | base/template_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698