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. |