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

Unified Diff: base/histogram.h

Issue 18214: Collect some metrics on nosniff. There is some concern that respecting this ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/histogram.h
===================================================================
--- base/histogram.h (revision 7938)
+++ base/histogram.h (working copy)
@@ -370,7 +370,19 @@
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.
//------------------------------------------------------------------------------
« no previous file with comments | « no previous file | chrome/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698