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

Unified Diff: base/metrics/histogram_base.cc

Issue 10830156: Skeleton code of SparseHistogram (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « base/metrics/histogram_base.h ('k') | base/metrics/sparse_histogram.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base.cc
===================================================================
--- base/metrics/histogram_base.cc (revision 150475)
+++ base/metrics/histogram_base.cc (working copy)
@@ -4,13 +4,24 @@
#include "base/metrics/histogram_base.h"
+#include <climits>
+
namespace base {
const HistogramBase::Sample HistogramBase::kSampleType_MAX = INT_MAX;
HistogramBase::HistogramBase(const std::string& name)
- : histogram_name_(name) {}
+ : histogram_name_(name),
+ flags_(kNoFlags) {}
HistogramBase::~HistogramBase() {}
+void HistogramBase::SetFlags(int32 flags) {
+ flags_ |= flags;
+}
+
+void HistogramBase::ClearFlags(int32 flags) {
+ flags_ &= ~flags;
+}
+
} // namespace base
« no previous file with comments | « base/metrics/histogram_base.h ('k') | base/metrics/sparse_histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698