| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 io_thread_.swap(thread); | 308 io_thread_.swap(thread); |
| 309 } | 309 } |
| 310 | 310 |
| 311 void BrowserProcessImpl::CreateFileThread() { | 311 void BrowserProcessImpl::CreateFileThread() { |
| 312 DCHECK(!created_file_thread_ && file_thread_.get() == NULL); | 312 DCHECK(!created_file_thread_ && file_thread_.get() == NULL); |
| 313 created_file_thread_ = true; | 313 created_file_thread_ = true; |
| 314 | 314 |
| 315 scoped_ptr<base::Thread> thread( | 315 scoped_ptr<base::Thread> thread( |
| 316 new BrowserProcessSubThread(ChromeThread::FILE)); | 316 new BrowserProcessSubThread(ChromeThread::FILE)); |
| 317 base::Thread::Options options; | 317 base::Thread::Options options; |
| 318 #if defined(OS_WIN) |
| 319 // On Windows, the FILE thread needs to be have a UI message loop which pumps |
| 320 // messages in such a way that Google Update can communicate back to us. |
| 318 options.message_loop_type = MessageLoop::TYPE_UI; | 321 options.message_loop_type = MessageLoop::TYPE_UI; |
| 322 #else |
| 323 options.message_loop_type = MessageLoop::TYPE_IO; |
| 324 #endif |
| 319 if (!thread->StartWithOptions(options)) | 325 if (!thread->StartWithOptions(options)) |
| 320 return; | 326 return; |
| 321 file_thread_.swap(thread); | 327 file_thread_.swap(thread); |
| 322 } | 328 } |
| 323 | 329 |
| 324 void BrowserProcessImpl::CreateDBThread() { | 330 void BrowserProcessImpl::CreateDBThread() { |
| 325 DCHECK(!created_db_thread_ && db_thread_.get() == NULL); | 331 DCHECK(!created_db_thread_ && db_thread_.get() == NULL); |
| 326 created_db_thread_ = true; | 332 created_db_thread_ = true; |
| 327 | 333 |
| 328 scoped_ptr<base::Thread> thread( | 334 scoped_ptr<base::Thread> thread( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 // TODO(port): remove this completely, it has no business being here. | 385 // TODO(port): remove this completely, it has no business being here. |
| 380 #endif | 386 #endif |
| 381 } | 387 } |
| 382 | 388 |
| 383 void BrowserProcessImpl::CreateGoogleURLTracker() { | 389 void BrowserProcessImpl::CreateGoogleURLTracker() { |
| 384 DCHECK(google_url_tracker_.get() == NULL); | 390 DCHECK(google_url_tracker_.get() == NULL); |
| 385 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); | 391 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); |
| 386 google_url_tracker_.swap(google_url_tracker); | 392 google_url_tracker_.swap(google_url_tracker); |
| 387 } | 393 } |
| 388 | 394 |
| OLD | NEW |