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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 549303003: Abort if BrowserMainLoops fails to start a browser thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 TRACE_EVENT0("startup", 1039 TRACE_EVENT0("startup",
1040 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition"); 1040 "BrowserMainLoop::BrowserThreadsStarted:InitSpeechRecognition");
1041 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( 1041 speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl(
1042 audio_manager_.get(), media_stream_manager_.get())); 1042 audio_manager_.get(), media_stream_manager_.get()));
1043 } 1043 }
1044 1044
1045 { 1045 {
1046 TRACE_EVENT0( 1046 TRACE_EVENT0(
1047 "startup", 1047 "startup",
1048 "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor"); 1048 "BrowserMainLoop::BrowserThreadsStarted::InitUserInputMonitor");
1049 user_input_monitor_ = media::UserInputMonitor::Create( 1049 if (io_thread_->message_loop_proxy().get() != NULL &&
Charlie Reis 2014/09/11 23:10:30 If we want to confirm that the cause of this crash
jiayl 2014/09/11 23:55:37 I tested it with your suggestion, but IsRunning()
1050 io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy()); 1050 main_thread_->message_loop_proxy().get() != NULL) {
1051 user_input_monitor_ = media::UserInputMonitor::Create(
1052 io_thread_->message_loop_proxy(), main_thread_->message_loop_proxy());
Charlie Reis 2014/09/11 23:10:30 Can this use task_runner() instead of message_loop
jiayl 2014/09/11 23:55:37 Will do.
1053 }
1051 } 1054 }
1052 1055
1053 { 1056 {
1054 TRACE_EVENT0("startup", 1057 TRACE_EVENT0("startup",
1055 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor"); 1058 "BrowserMainLoop::BrowserThreadsStarted::TimeZoneMonitor");
1056 time_zone_monitor_ = TimeZoneMonitor::Create(); 1059 time_zone_monitor_ = TimeZoneMonitor::Create();
1057 } 1060 }
1058 1061
1059 // Alert the clipboard class to which threads are allowed to access the 1062 // Alert the clipboard class to which threads are allowed to access the
1060 // clipboard: 1063 // clipboard:
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 &BrowserMainLoop::EndStartupTracing); 1197 &BrowserMainLoop::EndStartupTracing);
1195 } 1198 }
1196 1199
1197 void BrowserMainLoop::EndStartupTracing() { 1200 void BrowserMainLoop::EndStartupTracing() {
1198 is_tracing_startup_ = false; 1201 is_tracing_startup_ = false;
1199 TracingController::GetInstance()->DisableRecording( 1202 TracingController::GetInstance()->DisableRecording(
1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); 1203 startup_trace_file_, base::Bind(&OnStoppedStartupTracing));
1201 } 1204 }
1202 1205
1203 } // namespace content 1206 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698