summaryrefslogtreecommitdiffstats
path: root/base/metrics
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 20:55:10 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 20:55:10 +0000
commit33104a61421827beeb318612afe92c1cf673b6ec (patch)
tree2bc3e0c839b78a77f01e5229958e7727df062bad /base/metrics
parentc92ea3a284db20edcfecb5ff151351e47e1d2e84 (diff)
downloadchromium_src-33104a61421827beeb318612afe92c1cf673b6ec.zip
chromium_src-33104a61421827beeb318612afe92c1cf673b6ec.tar.gz
chromium_src-33104a61421827beeb318612afe92c1cf673b6ec.tar.bz2
Add metric for whether Autofill is enabled or disabled.
BUG=none TEST=unit_tests --gtest_filter=AutofillMetrics* Review URL: http://codereview.chromium.org/6826047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/metrics')
-rw-r--r--base/metrics/histogram.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h
index b7ae10a..bc58ee5 100644
--- a/base/metrics/histogram.h
+++ b/base/metrics/histogram.h
@@ -229,6 +229,15 @@ class Lock;
#define UMA_HISTOGRAM_PERCENTAGE(name, under_one_hundred) \
UMA_HISTOGRAM_ENUMERATION(name, under_one_hundred, 101)
+#define UMA_HISTOGRAM_BOOLEAN(name, sample) do { \
+ static base::Histogram* counter(NULL); \
+ if (!counter) \
+ counter = base::BooleanHistogram::FactoryGet(name, \
+ base::Histogram::kUmaTargetedHistogramFlag); \
+ DCHECK_EQ(name, counter->histogram_name()); \
+ counter->AddBoolean(sample); \
+ } while (0)
+
#define UMA_HISTOGRAM_ENUMERATION(name, sample, boundary_value) do { \
static base::Histogram* counter(NULL); \
if (!counter) \