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

Unified Diff: base/metrics/persistent_histogram_allocator.h

Issue 2023253002: Merge subprocess metrics into global StatisticsRecorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved comment about when merges occur Created 4 years, 7 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.cc ('k') | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator.h
diff --git a/base/metrics/persistent_histogram_allocator.h b/base/metrics/persistent_histogram_allocator.h
index 8df45f2813ae6899ad9bf6c294ad64ee477855c1..82c6bbcb19f0341c449691e804ef44a9b45e4bf4 100644
--- a/base/metrics/persistent_histogram_allocator.h
+++ b/base/metrics/persistent_histogram_allocator.h
@@ -248,6 +248,12 @@ class BASE_EXPORT PersistentHistogramAllocator {
// True, forgetting it otherwise.
void FinalizeHistogram(Reference ref, bool registered);
+ // Merges the data in a persistent histogram with one held globally by the
+ // StatisticsRecorder, updating the "logged" samples within the passed
+ // object so that repeated merges are allowed. Don't call this on a "global"
+ // allocator because histograms created there will already be in the SR.
+ void MergeHistogramToStatisticsRecorder(HistogramBase* histogram);
+
// Returns the object that manages the persistent-sample-map records for a
// given |id|. Only one |user| of this data is allowed at a time. This does
// an automatic Acquire() on the records. The user must call Release() on
« no previous file with comments | « base/metrics/histogram.cc ('k') | base/metrics/persistent_histogram_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698