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

Unified Diff: base/metrics/statistics_recorder.cc

Issue 1726873002: Report histogram creation results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some 'git cl format' changes Created 4 years, 10 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
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();

Powered by Google App Engine
This is Rietveld 408576698