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

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: addressed comments on patch set 5 + a unit test 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..0427a0bafc7eaab5f089e3db85dfdd1c0160f636 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -348,10 +348,22 @@ class Lock;
// 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) \
+#define UMA_HISTOGRAM_ENUMERATION_WITH_FLAGS(name, sample, boundary_value, flags) \
STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \
base::LinearHistogram::FactoryGet(name, 1, boundary_value, \
- boundary_value + 1, base::HistogramBase::kUmaTargetedHistogramFlag))
+ boundary_value + 1, flags))
+
+#define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
+ UMA_HISTOGRAM_ENUMERATION_WITH_FLAGS(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.
+#define UMA_STABILITY_HISTOGRAM_ENUMERATION(name, sample, boundary_value) \
+ UMA_HISTOGRAM_ENUMERATION_WITH_FLAGS(name, sample, boundary_value, \
+ base::HistogramBase::kUmaTargetedHistogramFlag | \
+ base::HistogramBase::kStabilityHistogramFlag)
#define UMA_HISTOGRAM_CUSTOM_ENUMERATION(name, sample, custom_ranges) \
STATIC_HISTOGRAM_POINTER_BLOCK(name, Add(sample), \

Powered by Google App Engine
This is Rietveld 408576698