Chromium Code Reviews| 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; |
| } |