Chromium Code Reviews| Index: base/metrics/statistics_recorder.h |
| diff --git a/base/metrics/statistics_recorder.h b/base/metrics/statistics_recorder.h |
| index 6c436c292e6987027276e0cdee49e60787ba1280..37b20a2a806d46e88efaacaa82fcd8b195e7745f 100644 |
| --- a/base/metrics/statistics_recorder.h |
| +++ b/base/metrics/statistics_recorder.h |
| @@ -165,6 +165,12 @@ class BASE_EXPORT StatisticsRecorder { |
| // Returns the number of known histograms. |
| static size_t GetHistogramCount(); |
| + // Initializes logging histograms with --v=1. Safe to call several times. |
| + // Is called from ctor but for browser it seems that it is more useful to |
| + // start logging after statistics recorder, so we need to init log-on-shutdown |
| + // later. |
| + static void InitLogOnShutdown(); |
| + |
| // 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. |
| @@ -211,6 +217,10 @@ class BASE_EXPORT StatisticsRecorder { |
| std::unique_ptr<CallbackMap> existing_callbacks_; |
| std::unique_ptr<RangesMap> existing_ranges_; |
| + bool vlog_initialized_ = false; |
| + |
| + void InitLogOnShutdownWithoutLock(); |
|
Alexei Svitkine (slow)
2016/06/29 14:24:47
Nit: Add a comment.
|
| + |
| static void Reset(); |
| static void DumpHistogramsToVlog(void* instance); |