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/thread.h" | 8 #include "base/thread.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/automation/automation_provider_list.h" | 10 #include "chrome/browser/automation/automation_provider_list.h" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 return; | 277 return; |
278 io_thread_.swap(thread); | 278 io_thread_.swap(thread); |
279 } | 279 } |
280 | 280 |
281 void BrowserProcessImpl::CreateFileThread() { | 281 void BrowserProcessImpl::CreateFileThread() { |
282 DCHECK(!created_file_thread_ && file_thread_.get() == NULL); | 282 DCHECK(!created_file_thread_ && file_thread_.get() == NULL); |
283 created_file_thread_ = true; | 283 created_file_thread_ = true; |
284 | 284 |
285 scoped_ptr<base::Thread> thread( | 285 scoped_ptr<base::Thread> thread( |
286 new BrowserProcessSubThread(ChromeThread::FILE)); | 286 new BrowserProcessSubThread(ChromeThread::FILE)); |
287 if (!thread->Start()) | 287 base::Thread::Options options; |
| 288 options.message_loop_type = MessageLoop::TYPE_IO; |
| 289 if (!thread->StartWithOptions(options)) |
288 return; | 290 return; |
289 file_thread_.swap(thread); | 291 file_thread_.swap(thread); |
290 } | 292 } |
291 | 293 |
292 void BrowserProcessImpl::CreateDBThread() { | 294 void BrowserProcessImpl::CreateDBThread() { |
293 DCHECK(!created_db_thread_ && db_thread_.get() == NULL); | 295 DCHECK(!created_db_thread_ && db_thread_.get() == NULL); |
294 created_db_thread_ = true; | 296 created_db_thread_ = true; |
295 | 297 |
296 scoped_ptr<base::Thread> thread( | 298 scoped_ptr<base::Thread> thread( |
297 new BrowserProcessSubThread(ChromeThread::DB)); | 299 new BrowserProcessSubThread(ChromeThread::DB)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 new ChromeViews::AcceleratorHandler); | 345 new ChromeViews::AcceleratorHandler); |
344 accelerator_handler_.swap(accelerator_handler); | 346 accelerator_handler_.swap(accelerator_handler); |
345 } | 347 } |
346 | 348 |
347 void BrowserProcessImpl::CreateGoogleURLTracker() { | 349 void BrowserProcessImpl::CreateGoogleURLTracker() { |
348 DCHECK(google_url_tracker_.get() == NULL); | 350 DCHECK(google_url_tracker_.get() == NULL); |
349 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); | 351 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); |
350 google_url_tracker_.swap(google_url_tracker); | 352 google_url_tracker_.swap(google_url_tracker); |
351 } | 353 } |
352 | 354 |
OLD | NEW |