Index: base/metrics/histogram_base.h |
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h |
index 24c104cee4f204ee8dd93f2b40a16306f7d53844..04a7ced64b54b6efb6fda22a45b1f08118906647 100644 |
--- a/base/metrics/histogram_base.h |
+++ b/base/metrics/histogram_base.h |
@@ -202,9 +202,13 @@ class BASE_EXPORT HistogramBase { |
// changed since the last call. |
virtual std::unique_ptr<HistogramSamples> SnapshotDelta() = 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 |