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

Unified Diff: base/metrics/histogram.h

Issue 137623002: Let MetricsService know about some Android Activities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: line warp fix Created 6 years, 11 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.h
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
index 9845362d98aa31cad7557383e2fc1e039ad5f67e..b67793d58d959244ef3eb47b52aef14413e18f3d 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -346,12 +346,24 @@ class Lock;
base::BooleanHistogram::FactoryGet(name, \
base::HistogramBase::kUmaTargetedHistogramFlag))
+// This is a helper macro used by other macros and shouldn't be used directly.
+#define UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary, flag) \
Ilya Sherman 2014/02/08 00:59:49 Please drop the UMA_ prefix from this name. UMA_
Kibeom Kim (inactive) 2014/02/10 22:24:45 Done.
+ STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
+ base::LinearHistogram::FactoryGet(name, 1, boundary, boundary + 1, \
+ flag))
+
// The samples should always be strictly less than |boundary_value|. For more
// details, see the comment for the |HISTOGRAM_ENUMERATION| macro, above.
#define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
- STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
- base::LinearHistogram::FactoryGet(name, 1, boundary_value, \
- boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag))
+ UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
+ base::HistogramBase::kUmaTargetedHistogramFlag)
+
+// In addition to UMA_HISTOGRAM_ENUMERATION, this adds |kStabilityHistogramFlag|
+// to the histogram. Use this if you are recording stability histogram, that
+// should be a part of the initial stability log.
Ilya Sherman 2014/02/08 00:59:49 nit: Minor suggested phrasing tweaks: "Similar to
Kibeom Kim (inactive) 2014/02/10 22:24:45 Done.
+#define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
+ UMA_HISTOGRAM_ENUMERATION_WITH_FLAG(name, sample, boundary_value, \
+ base::HistogramBase::kUmaStabilityHistogramFlag)
#define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \
STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
« no previous file with comments | « base/base.gyp ('k') | base/metrics/histogram_base.h » ('j') | base/metrics/histogram_base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698