Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: base/metrics/sparse_histogram.cc

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/statistics_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sparse_histogram.cc
diff --git a/base/metrics/sparse_histogram.cc b/base/metrics/sparse_histogram.cc
index e5cdb43c04fea1514a032ca3e5c311899a979af4..a853dce3505f450c5ef814371f63f1fa92e7523f 100644
--- a/base/metrics/sparse_histogram.cc
+++ b/base/metrics/sparse_histogram.cc
@@ -46,8 +46,12 @@ bool SparseHistogram::HasConstructionArguments(
}
void SparseHistogram::Add(Sample value) {
- base::AutoLock auto_lock(lock_);
- samples_.Accumulate(value, 1);
+ {
+ base::AutoLock auto_lock(lock_);
+ samples_.Accumulate(value, 1);
+ }
+
+ FindAndRunCallback(value);
}
scoped_ptr<HistogramSamples> SparseHistogram::SnapshotSamples() const {
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/statistics_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698