diff options
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 05d4299..80d6d57 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -139,6 +139,7 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) created_io_thread_(false), created_file_thread_(false), created_db_thread_(false), + created_process_launcher_thread_(false), created_profile_manager_(false), created_local_state_(false), #if defined(OS_WIN) @@ -212,6 +213,10 @@ BrowserProcessImpl::~BrowserProcessImpl() { // request before going away. ResetIOThread(); + // Stop the process launcher thread after the IO thread, in case the IO thread + // posted a task to terminate a process on the process launcher thread. + process_launcher_thread_.reset(); + // Clean up state that lives on the file_thread_ before it goes away. if (resource_dispatcher_host_.get()) { resource_dispatcher_host()->download_file_manager()->Shutdown(); @@ -383,6 +388,17 @@ void BrowserProcessImpl::CreateDBThread() { db_thread_.swap(thread); } +void BrowserProcessImpl::CreateProcessLauncherThread() { + DCHECK(!created_process_launcher_thread_ && !process_launcher_thread_.get()); + created_process_launcher_thread_ = true; + + scoped_ptr<base::Thread> thread( + new BrowserProcessSubThread(ChromeThread::PROCESS_LAUNCHER)); + if (!thread->Start()) + return; + process_launcher_thread_.swap(thread); +} + void BrowserProcessImpl::CreateProfileManager() { DCHECK(!created_profile_manager_ && profile_manager_.get() == NULL); created_profile_manager_ = true; |