Index: base/metrics/statistics_recorder.h |
diff --git a/base/metrics/statistics_recorder.h b/base/metrics/statistics_recorder.h |
index 36b2f308af30bf8bc52d23a7ddfd9af69d22ccc7..314600fdb09a7a8531a60355c6047e591ce66304 100644 |
--- a/base/metrics/statistics_recorder.h |
+++ b/base/metrics/statistics_recorder.h |
@@ -130,10 +130,6 @@ class BASE_EXPORT StatisticsRecorder { |
// histogram. This method is thread safe. |
static OnSampleCallback FindCallback(const std::string& histogram_name); |
- // Clears all of the known histograms and resets static variables to a |
- // state that allows a new initialization. |
- static void ResetForTesting(); |
- |
// Removes a histogram from the internal set of known ones. This can be |
// necessary during testing persistent histograms where the underlying |
// memory is being released. |
@@ -166,6 +162,13 @@ class BASE_EXPORT StatisticsRecorder { |
StatisticsRecorder(); |
~StatisticsRecorder(); |
+ // These are copies of everything that existed when the (test) Statistics- |
+ // Recorder was created. The global ones have to be moved aside to create a |
+ // clean environment. |
+ scoped_ptr<HistogramMap> existing_histograms_; |
+ scoped_ptr<CallbackMap> existing_callbacks_; |
+ scoped_ptr<RangesMap> existing_ranges_; |
Alexei Svitkine (slow)
2016/03/08 20:04:12
Can this be done in a test-only subclass?
bcwhite
2016/03/08 20:23:27
Potentially. It'll require turning private member
|
+ |
static void Reset(); |
static void DumpHistogramsToVlog(void* instance); |