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

Unified Diff: base/metrics/statistics_recorder.cc

Issue 10779040: Initialize StatisticsRecorder in Child Process to hold (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « base/metrics/statistics_recorder.h ('k') | chrome/browser/chrome_browser_application_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « base/metrics/statistics_recorder.h ('k') | chrome/browser/chrome_browser_application_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698