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

Unified Diff: base/metrics/histogram_persistence.cc

Issue 1726873002: Report histogram creation results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unnecessary include 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
Index: base/metrics/histogram_persistence.cc
diff --git a/base/metrics/histogram_persistence.cc b/base/metrics/histogram_persistence.cc
index f18d17528354329cd4995615d2451f6a52c59302..17ec35af6f807ee9c53b199b109fcbcb6c105845 100644
--- a/base/metrics/histogram_persistence.cc
+++ b/base/metrics/histogram_persistence.cc
@@ -187,6 +187,12 @@ void SetPersistentHistogramMemoryAllocator(
// also released, future accesses to those histograms will seg-fault.
CHECK(!g_allocator);
g_allocator = allocator;
+
+ size_t existing = StatisticsRecorder::GetHistogramCount();
+ if (existing != 0) {
+ DLOG(WARNING) << existing
grt (UTC plus 2) 2016/03/09 04:04:43 DLOG_IF(WARNING, existing) << ...
bcwhite 2016/03/09 14:01:57 Didn't know about that one. Will do.
bcwhite 2016/03/09 16:04:26 Done.
+ << " histograms were created before persistence was enabled.";
+ }
}
PersistentMemoryAllocator* GetPersistentHistogramMemoryAllocator() {

Powered by Google App Engine
This is Rietveld 408576698