Index: base/metrics/statistics_recorder.cc |
=================================================================== |
--- base/metrics/statistics_recorder.cc (revision 147155) |
+++ base/metrics/statistics_recorder.cc (working copy) |
@@ -10,6 +10,12 @@ |
#include "base/stringprintf.h" |
#include "base/synchronization/lock.h" |
+namespace { |
+// Initialize histogram statistics gathering system. |
+base::LazyInstance<base::StatisticsRecorder>::Leaky |
+ g_statistics_recorder_ = LAZY_INSTANCE_INITIALIZER; |
+} // namespace |
+ |
namespace base { |
// Collect the number of histograms created. |
@@ -67,6 +73,13 @@ |
} |
// static |
+void StatisticsRecorder::Initialize() { |
+ // Ensure that an instance of the StatisticsRecorder object is created. |
+ g_statistics_recorder_.Get(); |
+} |
+ |
+ |
+// static |
bool StatisticsRecorder::IsActive() { |
if (lock_ == NULL) |
return false; |