diff options
Diffstat (limited to 'chromium/content/public/browser/download_url_parameters.cc')
-rw-r--r-- | chromium/content/public/browser/download_url_parameters.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/chromium/content/public/browser/download_url_parameters.cc b/chromium/content/public/browser/download_url_parameters.cc index 498ae3d67ec..f73d984b745 100644 --- a/chromium/content/public/browser/download_url_parameters.cc +++ b/chromium/content/public/browser/download_url_parameters.cc @@ -10,6 +10,7 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" +#include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" #include "url/gurl.h" @@ -20,7 +21,7 @@ DownloadUrlParameters::DownloadUrlParameters( int render_process_host_id, int render_view_host_routing_id, int render_frame_host_routing_id, - ResourceContext* resource_context) + net::URLRequestContextGetter* url_request_context_getter) : content_initiated_(false), method_("GET"), post_id_(-1), @@ -28,10 +29,9 @@ DownloadUrlParameters::DownloadUrlParameters( render_process_host_id_(render_process_host_id), render_view_host_routing_id_(render_view_host_routing_id), render_frame_host_routing_id_(render_frame_host_routing_id), - resource_context_(resource_context), + url_request_context_getter_(url_request_context_getter), url_(url), - do_not_prompt_for_login_(false) { -} + do_not_prompt_for_login_(false) {} DownloadUrlParameters::~DownloadUrlParameters() { } @@ -40,11 +40,14 @@ DownloadUrlParameters::~DownloadUrlParameters() { scoped_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents( WebContents* web_contents, const GURL& url) { + RenderFrameHost* render_frame_host = web_contents->GetMainFrame(); + StoragePartition* storage_partition = BrowserContext::GetStoragePartition( + web_contents->GetBrowserContext(), render_frame_host->GetSiteInstance()); return scoped_ptr<DownloadUrlParameters>(new DownloadUrlParameters( - url, web_contents->GetRenderProcessHost()->GetID(), + url, render_frame_host->GetProcess()->GetID(), web_contents->GetRenderViewHost()->GetRoutingID(), - web_contents->GetMainFrame()->GetRoutingID(), - web_contents->GetBrowserContext()->GetResourceContext())); + render_frame_host->GetRoutingID(), + storage_partition->GetURLRequestContext())); } } // namespace content |