| Index: base/metrics/histogram.cc
|
| diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
|
| index 86c6746c0f590199cefe57c21d35ed4fcb7bd3a2..bf3c3ab6cfd317d9c366e25504b4e746c6382597 100644
|
| --- a/base/metrics/histogram.cc
|
| +++ b/base/metrics/histogram.cc
|
| @@ -453,6 +453,15 @@ std::unique_ptr<HistogramSamples> Histogram::SnapshotDelta() {
|
| return snapshot;
|
| }
|
|
|
| +std::unique_ptr<HistogramSamples> Histogram::SnapshotDifference() const {
|
| + std::unique_ptr<HistogramSamples> snapshot = SnapshotSampleVector();
|
| +
|
| + // Subtract what was previously logged and then return.
|
| + if (logged_samples_)
|
| + snapshot->Subtract(*logged_samples_);
|
| + return snapshot;
|
| +}
|
| +
|
| void Histogram::AddSamples(const HistogramSamples& samples) {
|
| samples_->Add(samples);
|
| }
|
|
|