| Index: ios/chrome/browser/ios_chrome_main_parts.mm
|
| diff --git a/ios/chrome/browser/ios_chrome_main_parts.mm b/ios/chrome/browser/ios_chrome_main_parts.mm
|
| index 722cad2bed9daa63425805ca552ac0badeaa4cec..e295f9fa993fc7daba857985cef140772b162181 100644
|
| --- a/ios/chrome/browser/ios_chrome_main_parts.mm
|
| +++ b/ios/chrome/browser/ios_chrome_main_parts.mm
|
| @@ -132,8 +132,6 @@ void IOSChromeMainParts::PreCreateThreads() {
|
|
|
| // Task Scheduler initialization needs to be here for the following reasons:
|
| // * After |SetupFieldTrials()|: Initialization uses variations.
|
| - // * Before |SetupMetrics()|: |SetupMetrics()| uses the blocking pool. The
|
| - // Task Scheduler must do any necessary redirection before then.
|
| // * Near the end of |PreCreateThreads()|: The TaskScheduler needs to be
|
| // created before any other threads are (by contract) but it creates
|
| // threads itself so instantiating it earlier is also incorrect.
|
| @@ -141,7 +139,6 @@ void IOSChromeMainParts::PreCreateThreads() {
|
| // shutdown call may also need to be moved.
|
| task_scheduler_util::InitializeDefaultBrowserTaskScheduler();
|
|
|
| - SetupMetrics();
|
|
|
| // Initialize FieldTrialSynchronizer system.
|
| field_trial_synchronizer_.reset(new ios::FieldTrialSynchronizer);
|
| @@ -150,6 +147,10 @@ void IOSChromeMainParts::PreCreateThreads() {
|
| }
|
|
|
| void IOSChromeMainParts::PreMainMessageLoopRun() {
|
| + // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the
|
| + // blocking pool, which is disabled until the CreateThreads phase of startup.
|
| + SetupMetrics();
|
| +
|
| // Now that the file thread has been started, start recording.
|
| StartMetricsRecording();
|
|
|
|
|