Chromium Code Reviews| Index: base/metrics/histogram.cc |
| diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc |
| index 42ced3d0abc2d366d7c077c349d5ff91c00f64fe..aeb0b70327208ac3beda9ca26180713539f64d3e 100644 |
| --- a/base/metrics/histogram.cc |
| +++ b/base/metrics/histogram.cc |
| @@ -265,6 +265,9 @@ void Histogram::Add(int value) { |
| if (value < 0) |
| value = 0; |
| samples_->Accumulate(value, 1); |
| + |
| + if (UNLIKELY(!callback_.is_null())) |
| + callback_.Run(); |
| } |
| scoped_ptr<HistogramSamples> Histogram::SnapshotSamples() const { |