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

Unified Diff: base/metrics/histogram.cc

Issue 1726873002: Report histogram creation results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added message for why not using macro Created 4 years, 9 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 | « no previous file | base/metrics/histogram_base.h » ('j') | base/metrics/histogram_base.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index ea4f8167fa28cc7098ce233cddbd7ed77fd23a77..83ad2cc5f7d0d0eced4cc07ec94c382ef0800867 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -211,9 +211,15 @@ HistogramBase* Histogram::Factory::Build() {
FinalizePersistentHistogram(histogram_ref,
histogram == tentative_histogram);
}
+
+ // Update report on created histograms.
+ ReportHistogramActivity(histogram, HISTOGRAM_CREATED);
+ } else {
+ // Update report on lookup histograms.
+ ReportHistogramActivity(histogram, HISTOGRAM_LOOKUP);
}
- DCHECK_EQ(histogram_type_, histogram->GetHistogramType());
+ DCHECK_EQ(histogram_type_, histogram->GetHistogramType()) << name_;
if (bucket_count_ != 0 &&
!histogram->HasConstructionArguments(minimum_, maximum_, bucket_count_)) {
// The construction arguments do not match the existing histogram. This can
« no previous file with comments | « no previous file | base/metrics/histogram_base.h » ('j') | base/metrics/histogram_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698