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

Unified Diff: content/common/child_process.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 | « content/common/child_process.h ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/child_process.cc
===================================================================
--- content/common/child_process.cc (revision 147145)
+++ content/common/child_process.cc (working copy)
@@ -9,6 +9,7 @@
#endif
#include "base/message_loop.h"
+#include "base/metrics/statistics_recorder.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/threading/thread.h"
@@ -32,6 +33,12 @@
DCHECK(!child_process_);
child_process_ = this;
+ // Initialize histogram statistics gathering system.
+ // Don't create StatisticsRecorder in the single process mode.
+ if (!base::StatisticsRecorder::IsActive()) {
+ statistics_recorder_.reset(new base::StatisticsRecorder());
+ }
+
// We can't recover from failing to start the IO thread.
CHECK(io_thread_.StartWithOptions(
base::Thread::Options(MessageLoop::TYPE_IO, 0)));
@@ -50,6 +57,8 @@
// destruction code might depend on it.
main_thread_.reset();
+ statistics_recorder_.reset();
jam 2012/07/18 01:22:06 nit: is this necessary? if not, leave it out
ramant (doing other things) 2012/07/18 03:20:32 Done.
+
child_process_ = NULL;
}
« no previous file with comments | « content/common/child_process.h ('k') | content/renderer/renderer_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698