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

Unified Diff: base/metrics/persistent_histogram_allocator.h

Issue 1875503003: Revert "Create and pass shared-histogram-allocator from browser to renderer." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | chrome/browser/metrics/chrome_metrics_service_client.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 b2038c4314c704f572771648b76410fdcffd03b0..12ac68500cb202c63ff8e813d6b16762022f6e85 100644
--- a/base/metrics/persistent_histogram_allocator.h
+++ b/base/metrics/persistent_histogram_allocator.h
@@ -116,6 +116,13 @@ class BASE_EXPORT PersistentHistogramAllocator {
// Histogram containing creation results. Visible for testing.
static HistogramBase* GetCreateHistogramResultHistogram();
+ // This access to the persistent allocator is only for testing; it extracts
+ // the current allocator completely. This allows easy creation of histograms
+ // within persistent memory segments which can then be extracted and used
+ // in other ways.
+ static std::unique_ptr<PersistentHistogramAllocator>
+ ReleaseGlobalAllocatorForTesting();
+
protected:
// The structure used to hold histogram data in persistent memory. It is
// defined and used entirely within the .cc file.
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698