Index: base/metrics/histogram_base.h |
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h |
index 58a9ab2edc093393fdd7177c3f99f47b543b41e4..1dbe679bd01d1f76cc06beff04839a550db5e6f5 100644 |
--- a/base/metrics/histogram_base.h |
+++ b/base/metrics/histogram_base.h |
@@ -211,9 +211,13 @@ class BASE_EXPORT HistogramBase { |
// read-only memory. |
virtual std::unique_ptr<HistogramSamples> SnapshotFinalDelta() const = 0; |
- // The following methods provide graphical histogram displays. |
- virtual void WriteHTMLGraph(std::string* output) const = 0; |
- virtual void WriteAscii(std::string* output) const = 0; |
+ // The following methods provide graphical histogram displays. The snapshot |
+ // must be for this histogram or the results are undefined. If the passed |
+ // |snapshot| is null, one will be taken of the internal data. |
+ virtual void WriteHTMLGraph(const HistogramSamples* snapshot, |
+ std::string* output) const = 0; |
+ virtual void WriteAscii(const HistogramSamples* snapshot, |
+ std::string* output) const = 0; |
// Produce a JSON representation of the histogram. This is implemented with |
// the help of GetParameters and GetCountAndBucketData; overwrite them to |