| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/thread.h" | 9 #include "base/thread.h" |
| 10 #include "base/waitable_event.h" | 10 #include "base/waitable_event.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // it is predominantly used from the io thread, but must be created | 287 // it is predominantly used from the io thread, but must be created |
| 288 // on the main thread. The service ctor is inexpensive and does not | 288 // on the main thread. The service ctor is inexpensive and does not |
| 289 // invoke the io_thread() accessor. | 289 // invoke the io_thread() accessor. |
| 290 PluginService::GetInstance(); | 290 PluginService::GetInstance(); |
| 291 | 291 |
| 292 #if defined(OS_LINUX) | 292 #if defined(OS_LINUX) |
| 293 // The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so | 293 // The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so |
| 294 // we start it now. | 294 // we start it now. |
| 295 scoped_ptr<base::Thread> background_x11_thread( | 295 scoped_ptr<base::Thread> background_x11_thread( |
| 296 new BrowserProcessSubThread(ChromeThread::BACKGROUND_X11)); | 296 new BrowserProcessSubThread(ChromeThread::BACKGROUND_X11)); |
| 297 if (!background_x11_thread->Start()) | 297 base::Thread::Options x11_options; |
| 298 x11_options.message_loop_type = MessageLoop::TYPE_IO; |
| 299 if (!background_x11_thread->StartWithOptions(x11_options)) |
| 298 return; | 300 return; |
| 299 background_x11_thread_.swap(background_x11_thread); | 301 background_x11_thread_.swap(background_x11_thread); |
| 300 #endif | 302 #endif |
| 301 | 303 |
| 302 scoped_ptr<base::Thread> thread( | 304 scoped_ptr<base::Thread> thread( |
| 303 new BrowserProcessSubThread(ChromeThread::IO)); | 305 new BrowserProcessSubThread(ChromeThread::IO)); |
| 304 base::Thread::Options options; | 306 base::Thread::Options options; |
| 305 options.message_loop_type = MessageLoop::TYPE_IO; | 307 options.message_loop_type = MessageLoop::TYPE_IO; |
| 306 if (!thread->StartWithOptions(options)) | 308 if (!thread->StartWithOptions(options)) |
| 307 return; | 309 return; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 #else | 392 #else |
| 391 // TODO(port): remove this completely, it has no business being here. | 393 // TODO(port): remove this completely, it has no business being here. |
| 392 #endif | 394 #endif |
| 393 } | 395 } |
| 394 | 396 |
| 395 void BrowserProcessImpl::CreateGoogleURLTracker() { | 397 void BrowserProcessImpl::CreateGoogleURLTracker() { |
| 396 DCHECK(google_url_tracker_.get() == NULL); | 398 DCHECK(google_url_tracker_.get() == NULL); |
| 397 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); | 399 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); |
| 398 google_url_tracker_.swap(google_url_tracker); | 400 google_url_tracker_.swap(google_url_tracker); |
| 399 } | 401 } |
| OLD | NEW |