diff options
Diffstat (limited to 'chrome/browser/download')
5 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 22ffa5c..b0828e1 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -97,7 +97,9 @@ class CancelTestDataCollector : public base::RefCountedThreadSafe<CancelTestDataCollector> { public: CancelTestDataCollector() - : slow_download_job_pending_requests_(0), + : resource_dispatcher_host_( + g_browser_process->resource_dispatcher_host()), + slow_download_job_pending_requests_(0), dfm_pending_downloads_(0) { } void WaitForDataCollected() { @@ -122,8 +124,7 @@ class CancelTestDataCollector private: void IOInfoCollector() { - download_file_manager_ = - ResourceDispatcherHost::Get()->download_file_manager(); + download_file_manager_ = resource_dispatcher_host_->download_file_manager(); slow_download_job_pending_requests_ = URLRequestSlowDownloadJob::NumberOutstandingRequests(); BrowserThread::PostTask( @@ -137,6 +138,7 @@ class CancelTestDataCollector BrowserThread::UI, FROM_HERE, MessageLoop::QuitClosure()); } + ResourceDispatcherHost* resource_dispatcher_host_; DownloadFileManager* download_file_manager_; int slow_download_job_pending_requests_; int dfm_pending_downloads_; diff --git a/chrome/browser/download/download_extension_api.cc b/chrome/browser/download/download_extension_api.cc index 3a38259..7f9effc 100644 --- a/chrome/browser/download/download_extension_api.cc +++ b/chrome/browser/download/download_extension_api.cc @@ -33,6 +33,7 @@ #include "chrome/browser/renderer_host/chrome_render_message_filter.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/webui/web_ui_util.h" +#include "content/browser/download/download_file_manager.h" #include "content/browser/download/download_id.h" #include "content/browser/download/download_state_info.h" #include "content/browser/download/download_types.h" @@ -232,7 +233,7 @@ bool DownloadsDownloadFunction::ParseArgs() { } } } - iodata_->rdh = ResourceDispatcherHost::Get(); + iodata_->rdh = g_browser_process->resource_dispatcher_host(); iodata_->resource_context = &profile()->GetResourceContext(); iodata_->render_process_host_id = render_view_host()->process()->GetID(); iodata_->render_view_host_routing_id = render_view_host()->routing_id(); diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc index 3f2c669..42e6a2c 100644 --- a/chrome/browser/download/download_manager_unittest.cc +++ b/chrome/browser/download/download_manager_unittest.cc @@ -29,13 +29,13 @@ #include "content/browser/download/download_file_impl.h" #include "content/browser/download/download_file_manager.h" #include "content/browser/download/download_id_factory.h" +#include "content/browser/download/download_manager_impl.h" #include "content/browser/download/download_request_handle.h" #include "content/browser/download/download_status_updater.h" #include "content/browser/download/interrupt_reasons.h" #include "content/browser/download/mock_download_file.h" #include "content/browser/download/mock_download_manager.h" #include "content/public/browser/download_item.h" -#include "content/public/browser/download_manager.h" #include "content/test/test_browser_thread.h" #include "grit/generated_resources.h" #include "net/base/io_buffer.h" @@ -167,7 +167,7 @@ class DownloadManagerTest : public testing::Test { download_manager_delegate_(new TestDownloadManagerDelegate( profile_.get())), id_factory_(new DownloadIdFactory(kValidIdDomain)), - download_manager_(DownloadManager::Create( + download_manager_(new DownloadManagerImpl( download_manager_delegate_, id_factory_, &download_status_updater_)), diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc index 98031ec..833949a 100644 --- a/chrome/browser/download/download_service.cc +++ b/chrome/browser/download/download_service.cc @@ -11,7 +11,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "content/browser/download/download_id_factory.h" -#include "content/public/browser/download_manager.h" +#include "content/browser/download/download_manager_impl.h" using content::DownloadManager; @@ -47,7 +47,7 @@ DownloadManager* DownloadService::GetDownloadManager() { // SetDownloadManagerDelegateForTesting. if (!manager_delegate_.get()) manager_delegate_ = new ChromeDownloadManagerDelegate(profile_); - manager_ = DownloadManager::Create( + manager_ = new DownloadManagerImpl( manager_delegate_.get(), id_factory_.get(), g_browser_process->download_status_updater()); diff --git a/chrome/browser/download/download_throttling_resource_handler.cc b/chrome/browser/download/download_throttling_resource_handler.cc index 98a9fb5..7f4ba73 100644 --- a/chrome/browser/download/download_throttling_resource_handler.cc +++ b/chrome/browser/download/download_throttling_resource_handler.cc @@ -6,6 +6,7 @@ #include "base/logging.h" #include "content/browser/download/download_id.h" +#include "content/browser/download/download_resource_handler.h" #include "content/browser/download/download_stats.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |