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

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

Issue 10823406: Remove DownloadFileManager in favor of direct ownership of DownloadFiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments and merged to LKGR. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/download/base_file.h » ('j') | 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/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/metrics/field_trial.h" 13 #include "base/metrics/field_trial.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
18 #include "content/browser/browser_thread_impl.h" 18 #include "content/browser/browser_thread_impl.h"
19 #include "content/browser/download/download_file_manager.h"
20 #include "content/browser/download/save_file_manager.h" 19 #include "content/browser/download/save_file_manager.h"
21 #include "content/browser/gamepad/gamepad_service.h" 20 #include "content/browser/gamepad/gamepad_service.h"
22 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 21 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
23 #include "content/browser/gpu/gpu_process_host.h" 22 #include "content/browser/gpu/gpu_process_host.h"
24 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 23 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
25 #include "content/browser/histogram_synchronizer.h" 24 #include "content/browser/histogram_synchronizer.h"
26 #include "content/browser/in_process_webkit/webkit_thread.h" 25 #include "content/browser/in_process_webkit/webkit_thread.h"
27 #include "content/browser/net/browser_online_state_observer.h" 26 #include "content/browser/net/browser_online_state_observer.h"
28 #include "content/browser/plugin_service_impl.h" 27 #include "content/browser/plugin_service_impl.h"
29 #include "content/browser/renderer_host/media/audio_input_device_manager.h" 28 #include "content/browser/renderer_host/media/audio_input_device_manager.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 resource_dispatcher_host_.reset(); 558 resource_dispatcher_host_.reset();
560 break; 559 break;
561 case BrowserThread::FILE_USER_BLOCKING: 560 case BrowserThread::FILE_USER_BLOCKING:
562 thread_to_stop = &file_user_blocking_thread_; 561 thread_to_stop = &file_user_blocking_thread_;
563 break; 562 break;
564 case BrowserThread::FILE: 563 case BrowserThread::FILE:
565 thread_to_stop = &file_thread_; 564 thread_to_stop = &file_thread_;
566 565
567 // Clean up state that lives on or uses the file_thread_ before 566 // Clean up state that lives on or uses the file_thread_ before
568 // it goes away. 567 // it goes away.
569 if (resource_dispatcher_host_.get()) { 568 if (resource_dispatcher_host_.get())
570 resource_dispatcher_host_.get()->download_file_manager()->Shutdown();
571 resource_dispatcher_host_.get()->save_file_manager()->Shutdown(); 569 resource_dispatcher_host_.get()->save_file_manager()->Shutdown();
572 }
573 break; 570 break;
574 case BrowserThread::PROCESS_LAUNCHER: 571 case BrowserThread::PROCESS_LAUNCHER:
575 thread_to_stop = &process_launcher_thread_; 572 thread_to_stop = &process_launcher_thread_;
576 break; 573 break;
577 case BrowserThread::CACHE: 574 case BrowserThread::CACHE:
578 thread_to_stop = &cache_thread_; 575 thread_to_stop = &cache_thread_;
579 break; 576 break;
580 case BrowserThread::IO: 577 case BrowserThread::IO:
581 thread_to_stop = &io_thread_; 578 thread_to_stop = &io_thread_;
582 break; 579 break;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 693 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
697 if (parameters_.ui_task) 694 if (parameters_.ui_task)
698 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 695 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
699 696
700 base::RunLoop run_loop; 697 base::RunLoop run_loop;
701 run_loop.Run(); 698 run_loop.Run();
702 #endif 699 #endif
703 } 700 }
704 701
705 } // namespace content 702 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/download/base_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698