diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-12 01:11:25 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-12 01:11:25 +0000 |
commit | ea114727620483755ebecf7b3fe4e7f9d50316e4 (patch) | |
tree | 4731c05242dc6745d2a7e9fb50e1e310470c7138 /chrome/browser/download | |
parent | 0535866266fe81c93349f9abf0d2e2b87519b3d0 (diff) | |
download | chromium_src-ea114727620483755ebecf7b3fe4e7f9d50316e4.zip chromium_src-ea114727620483755ebecf7b3fe4e7f9d50316e4.tar.gz chromium_src-ea114727620483755ebecf7b3fe4e7f9d50316e4.tar.bz2 |
Add content/public/browser/resource_dispatcher_host.h
R=jam@chromium.org
TBR=willchan@chromium.org,mirandac@chromium.org,ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9648020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_browsertest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/download/download_extension_api.cc | 15 | ||||
-rw-r--r-- | chrome/browser/download/download_extension_api.h | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index 8f6d762..448ef24 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc @@ -43,9 +43,9 @@ #include "chrome/common/url_constants.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "content/browser/download/download_types.h" #include "content/browser/net/url_request_mock_http_job.h" #include "content/browser/net/url_request_slow_download_job.h" -#include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/public/browser/download_item.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/download_persistent_store_info.h" diff --git a/chrome/browser/download/download_extension_api.cc b/chrome/browser/download/download_extension_api.cc index 716220c..9ca6e5f 100644 --- a/chrome/browser/download/download_extension_api.cc +++ b/chrome/browser/download/download_extension_api.cc @@ -39,11 +39,11 @@ #include "chrome/browser/ui/webui/web_ui_util.h" #include "content/browser/download/download_state_info.h" #include "content/browser/download/download_types.h" -#include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/public/browser/download_interrupt_reasons.h" #include "content/public/browser/download_item.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" +#include "content/public/browser/resource_dispatcher_host.h" #include "net/base/load_flags.h" #include "net/http/http_util.h" #include "net/url_request/url_request.h" @@ -432,7 +432,7 @@ bool DownloadsDownloadFunction::ParseArgs() { } } } - iodata_->rdh = ResourceDispatcherHost::Get(); + iodata_->rdh = content::ResourceDispatcherHost::Get(); iodata_->resource_context = profile()->GetResourceContext(); iodata_->render_process_host_id = render_view_host()->GetProcess()->GetID(); iodata_->render_view_host_routing_id = render_view_host()->GetRoutingID(); @@ -458,8 +458,7 @@ void DownloadsDownloadFunction::BeginDownloadOnIOThread() { save_info.suggested_name = iodata_->filename; save_info.prompt_for_save_location = iodata_->save_as; - scoped_ptr<net::URLRequest> request( - new net::URLRequest(iodata_->url, iodata_->rdh)); + scoped_ptr<net::URLRequest> request(new net::URLRequest(iodata_->url, NULL)); request->set_method(iodata_->method); if (iodata_->extra_headers != NULL) { for (size_t index = 0; index < iodata_->extra_headers->GetSize(); ++index) { @@ -495,12 +494,12 @@ void DownloadsDownloadFunction::BeginDownloadOnIOThread() { net::Error error = iodata_->rdh->BeginDownload( request.Pass(), - false, // prefer_cache - save_info, - base::Bind(&DownloadsDownloadFunction::OnStarted, this), + iodata_->resource_context, iodata_->render_process_host_id, iodata_->render_view_host_routing_id, - iodata_->resource_context); + false, // prefer_cache + save_info, + base::Bind(&DownloadsDownloadFunction::OnStarted, this)); iodata_.reset(); if (error != net::OK) { diff --git a/chrome/browser/download/download_extension_api.h b/chrome/browser/download/download_extension_api.h index 3da28e7..b024664 100644 --- a/chrome/browser/download/download_extension_api.h +++ b/chrome/browser/download/download_extension_api.h @@ -22,10 +22,10 @@ class DownloadFileIconExtractor; class DownloadQuery; -class ResourceDispatcherHost; namespace content { class ResourceContext; +class ResourceDispatcherHost; } // Functions in the chrome.experimental.downloads namespace facilitate @@ -135,7 +135,7 @@ class DownloadsDownloadFunction : public AsyncDownloadsFunction { base::ListValue* extra_headers; std::string method; std::string post_body; - ResourceDispatcherHost* rdh; + content::ResourceDispatcherHost* rdh; content::ResourceContext* resource_context; int render_process_host_id; int render_view_host_routing_id; |