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

Unified Diff: base/metrics/sparse_histogram.h

Issue 484603006: Add LOCAL_ prefix to non-UMA histogram macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 6 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 | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sparse_histogram_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sparse_histogram.h
diff --git a/base/metrics/sparse_histogram.h b/base/metrics/sparse_histogram.h
index 07d56603a5d8b4b7a85caadedbbf67d6dba39215..c1149163f59b4cb5b8d6dff303bd1a3721a07105 100644
--- a/base/metrics/sparse_histogram.h
+++ b/base/metrics/sparse_histogram.h
@@ -19,39 +19,13 @@
namespace base {
-// The common code for different SparseHistogram macros.
-#define HISTOGRAM_SPARSE_COMMON(name, sample, flag) \
+#define UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample) \
do { \
- base::HistogramBase* histogram( \
- base::SparseHistogram::FactoryGet(name, flag)); \
- DCHECK_EQ(histogram->histogram_name(), name); \
+ base::HistogramBase* histogram = base::SparseHistogram::FactoryGet( \
+ name, base::HistogramBase::kUmaTargetedHistogramFlag); \
histogram->Add(sample); \
} while (0)
-#define HISTOGRAM_SPARSE_SLOWLY(name, sample) \
- HISTOGRAM_SPARSE_COMMON(name, sample, base::HistogramBase::kNoFlags)
-
-#define UMA_HISTOGRAM_SPARSE_SLOWLY(name, sample) \
- HISTOGRAM_SPARSE_COMMON(name, sample, \
- base::HistogramBase::kUmaTargetedHistogramFlag)
-
-//------------------------------------------------------------------------------
-// Define debug only version of macros.
-#ifndef NDEBUG
-
-#define DHISTOGRAM_SPARSE_SLOWLY(name, sample) \
- HISTOGRAM_SPARSE_SLOWLY(name, sample)
-
-#else // NDEBUG
-
-#define DHISTOGRAM_SPARSE_SLOWLY(name, sample) \
- while (0) { \
- static_cast<void>(name); \
- static_cast<void>(sample); \
- }
-
-#endif // NDEBUG
-
class HistogramSamples;
class BASE_EXPORT_PRIVATE SparseHistogram : public HistogramBase {
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sparse_histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698