summaryrefslogtreecommitdiffstats
path: root/base/histogram.h
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-17 19:15:36 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-17 19:15:36 +0000
commit30629139d1e967d14c0df8752831a0b9b78f49b9 (patch)
tree0f9e28068ca2dd6120a0d2f58ae999eed32cfbd6 /base/histogram.h
parent435ba90f861416f41753284966dab9bae422043f (diff)
downloadchromium_src-30629139d1e967d14c0df8752831a0b9b78f49b9.zip
chromium_src-30629139d1e967d14c0df8752831a0b9b78f49b9.tar.gz
chromium_src-30629139d1e967d14c0df8752831a0b9b78f49b9.tar.bz2
Collect some metrics on nosniff. There is some concern that respecting this header causes more harm than good.
R=darin Review URL: http://codereview.chromium.org/18214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r--base/histogram.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/base/histogram.h b/base/histogram.h
index f56d05f..8b4bded 100644
--- a/base/histogram.h
+++ b/base/histogram.h
@@ -370,6 +370,18 @@ class LinearHistogram : public Histogram {
DISALLOW_EVIL_CONSTRUCTORS(LinearHistogram);
};
+//------------------------------------------------------------------------------
+
+// BooleanHistogram is a histogram for booleans.
+class BooleanHistogram : public LinearHistogram {
+ public:
+ BooleanHistogram(const wchar_t* name) : LinearHistogram(name, 0, 2, 3) {}
+
+ virtual void AddBoolean(bool value) { Add(value ? 1 : 0); }
+
+ private:
+ DISALLOW_EVIL_CONSTRUCTORS(BooleanHistogram);
+};
//------------------------------------------------------------------------------
// This section provides implementation for ThreadSafeHistogram.