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

Unified Diff: content/public/browser/download_url_parameters.cc

Issue 1977623002: Updates to DownloadUrlParameters in preparation for OOPIF changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
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 ed497a3e4450a6844b3fb1a047a39a39f2c5a52f..e38c34ebdb8a1bf5c2a25b23de09d4b1f462fbd6 100644
--- a/content/public/browser/download_url_parameters.cc
+++ b/content/public/browser/download_url_parameters.cc
@@ -18,6 +18,12 @@ namespace content {
DownloadUrlParameters::DownloadUrlParameters(
const GURL& url,
+ net::URLRequestContextGetter* url_request_context_getter)
+ : DownloadUrlParameters(url, -1, -1, -1, url_request_context_getter) {
+}
+
+DownloadUrlParameters::DownloadUrlParameters(
+ const GURL& url,
int render_process_host_id,
int render_view_host_routing_id,
int render_frame_host_routing_id,
@@ -37,7 +43,8 @@ DownloadUrlParameters::~DownloadUrlParameters() {
}
// static
-std::unique_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents(
+std::unique_ptr<DownloadUrlParameters>
+DownloadUrlParameters::CreateForWebContentsMainFrame(
WebContents* web_contents,
const GURL& url) {
RenderFrameHost* render_frame_host = web_contents->GetMainFrame();
@@ -45,7 +52,7 @@ std::unique_ptr<DownloadUrlParameters> DownloadUrlParameters::FromWebContents(
web_contents->GetBrowserContext(), render_frame_host->GetSiteInstance());
return std::unique_ptr<DownloadUrlParameters>(new DownloadUrlParameters(
url, render_frame_host->GetProcess()->GetID(),
- web_contents->GetRenderViewHost()->GetRoutingID(),
+ render_frame_host->GetRenderViewHost()->GetRoutingID(),
render_frame_host->GetRoutingID(),
storage_partition->GetURLRequestContext()));
}

Powered by Google App Engine
This is Rietveld 408576698