Index: base/metrics/histogram.h |
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h |
index 9845362d98aa31cad7557383e2fc1e039ad5f67e..f503b3f1ec6eeba9541bc4f00264075fd0fdc56d 100644 |
--- a/base/metrics/histogram.h |
+++ b/base/metrics/histogram.h |
@@ -676,6 +676,23 @@ class BASE_EXPORT CustomHistogram : public Histogram { |
DISALLOW_COPY_AND_ASSIGN(CustomHistogram); |
}; |
+ |
+// DummyHistogram is an object that overrides Histogram's Add* functions |
+// to provide no functionality. This can be returned in the case of mismatched |
+// construction arguments to any of the other Histograms' FactoryGet calls. |
+class BASE_EXPORT DummyHistogram : public Histogram { |
Alexei Svitkine (slow)
2014/01/17 15:40:13
I would actually define this class in an anon name
elijahtaylor1
2014/01/17 20:04:16
Done.
|
+ public: |
+ virtual void Add(Sample value) OVERRIDE {} |
+ virtual void AddSamples(const HistogramSamples& samples) OVERRIDE {} |
+ virtual bool AddSamplesFromPickle(PickleIterator* iter) OVERRIDE; |
+ |
+ DummyHistogram(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(DummyHistogram); |
+}; |
+ |
+ |
} // namespace base |
#endif // BASE_METRICS_HISTOGRAM_H_ |