Index: base/test/histogram_tester.h |
diff --git a/base/test/histogram_tester.h b/base/test/histogram_tester.h |
index ecf33f831f0d1844531821a5face3c01ff30b198..1bd024c69f9f324538fdedb19a75c2aa646d3a68 100644 |
--- a/base/test/histogram_tester.h |
+++ b/base/test/histogram_tester.h |
@@ -78,6 +78,10 @@ class HistogramTester { |
// histogram_tester.GetAllSamples("HistogramName")); |
std::vector<Bucket> GetAllSamples(const std::string& name) const; |
+ // Returns the value of the |sample| bucket for ths histogram |name|. |
+ HistogramBase::Count GetBucketCount(const std::string& name, |
+ HistogramBase::Sample sample) const; |
+ |
// Finds histograms whose names start with |prefix|, and returns them along |
// with the counts of any samples added since the creation of this object. |
// Histograms that are unchanged are omitted from the result. The return value |
@@ -119,6 +123,14 @@ class HistogramTester { |
Histogram::Count expected_count, |
const HistogramSamples& samples) const; |
+ // Sets the value for |count| to be the value in the |sample| bucket. The |
+ // bucket's current value is determined from |samples| and is modified based |
+ // on the snapshot stored for histogram |name|. |
+ void GetBucketCountForSamples(const std::string& name, |
+ HistogramBase::Sample sample, |
+ const HistogramSamples& samples, |
+ HistogramBase::Count* count) const; |
+ |
// Used to determine the histogram changes made during this instance's |
// lifecycle. |
std::map<std::string, std::unique_ptr<HistogramSamples>> histograms_snapshot_; |