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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_impl.cc

Issue 10387090: Pass the referrer policy with the referrer for the save package code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 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/browser/renderer_host/resource_dispatcher_host_impl.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.cc b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
index ecc525bb72ecbc91d9b55652820aca92f9db2568..45b3092e2fdb1e64c1ecbbd688ef96cd8f7c8786 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.cc
@@ -1138,7 +1138,7 @@ void ResourceDispatcherHostImpl::OnDidLoadResourceFromMemoryCache(
// This function is only used for saving feature.
void ResourceDispatcherHostImpl::BeginSaveFile(
const GURL& url,
- const GURL& referrer,
+ const content::Referrer& referrer,
int child_id,
int route_id,
ResourceContext* context) {
@@ -1171,7 +1171,8 @@ void ResourceDispatcherHostImpl::BeginSaveFile(
net::URLRequest* request = new net::URLRequest(url, this);
request->set_method("GET");
- request->set_referrer(MaybeStripReferrer(referrer).spec());
+ request->set_referrer(MaybeStripReferrer(referrer.url).spec());
+ webkit_glue::ConfigureURLRequestForReferrerPolicy(request, referrer.policy);
// So far, for saving page, we need fetch content from cache, in the
// future, maybe we can use a configuration to configure this behavior.
request->set_load_flags(net::LOAD_PREFERRING_CACHE);

Powered by Google App Engine
This is Rietveld 408576698