| Index: content/public/browser/download_url_parameters.cc
|
| diff --git a/content/public/browser/download_url_parameters.cc b/content/public/browser/download_url_parameters.cc
|
| index a17be5a06d48f647bccd7facd6bd37001a7a39c5..ed497a3e4450a6844b3fb1a047a39a39f2c5a52f 100644
|
| --- a/content/public/browser/download_url_parameters.cc
|
| +++ b/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() {
|
| std::unique_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 std::unique_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
|
|
|