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

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: CL cleanup 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
Index: base/metrics/histogram_macros.h
diff --git a/base/metrics/histogram_macros.h b/base/metrics/histogram_macros.h
index dcde7255c8dafee8e28c09e21baf492408ea8682..b60c3abdbb03cd0687d6bf6deb3dcebb002cbcd1 100644
--- a/base/metrics/histogram_macros.h
+++ b/base/metrics/histogram_macros.h
@@ -148,10 +148,12 @@
// One additional bucket is created in the LinearHistogram for the illegal
// 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))
+#define HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \
+ STATIC_HISTOGRAM_POINTER_BLOCK( \
+ name, Add(static_cast<base::HistogramBase::Sample>(sample)), \
+ base::LinearHistogram::FactoryGet( \
+ name, 1, static_cast<base::HistogramBase::Sample>(boundary), \
+ static_cast<uint32_t>(boundary) + 1, flag))
Ilya Sherman 2016/08/22 20:52:12 I'm not comfortable with adding a blanket static_c
Sidney San Martín 2016/08/25 00:55:11 Thanks, in retrospect that was careless. I created
Ilya Sherman 2016/08/25 01:12:56 Very cool! What does a compile error look like if
Sidney San Martín 2016/08/30 18:46:37 It passed doubles through, since existing code alr
#define LOCAL_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
LOCAL_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h » ('j') | chrome/browser/ui/sad_tab.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698