Index: base/metrics/statistics_recorder.cc |
diff --git a/base/metrics/statistics_recorder.cc b/base/metrics/statistics_recorder.cc |
index d0fa2add3603b3f574dfa9ef9e5ee2e6b152aafc..5f7c4e406bd1ba47fdf8a3512c9604f0cf9babef 100644 |
--- a/base/metrics/statistics_recorder.cc |
+++ b/base/metrics/statistics_recorder.cc |
@@ -369,6 +369,17 @@ StatisticsRecorder::OnSampleCallback StatisticsRecorder::FindCallback( |
} |
// static |
+size_t StatisticsRecorder::NumberOfHistograms() { |
Alexei Svitkine (slow)
2016/03/01 16:41:34
Nit: GetHistogramCount()
bcwhite
2016/03/02 19:14:19
Done.
|
+ if (!lock_) |
+ return 0; |
+ |
+ base::AutoLock auto_lock(*lock_); |
+ if (!histograms_) |
+ return 0; |
+ return histograms_->size(); |
+} |
+ |
+// static |
void StatisticsRecorder::ResetForTesting() { |
// Just call the private version that is used also by the destructor. |
Reset(); |