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

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

Issue 2393633006: Send net's ReferrerPolicy back to Blink while following redirects (Closed)
Patch Set: Remove unnecessary referrer calculation in DocumentThreadableLoader Created 4 years, 2 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
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index f2c1ac98e8cd6387941ada630c8b712ed8d68600..3bd094bd998ee4143228ba2e3ee8be55ae4e665e 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -260,9 +260,13 @@ void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) {
net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE;
switch (referrer.policy) {
case blink::WebReferrerPolicyAlways:
+ net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER;
+ break;
case blink::WebReferrerPolicyNever:
+ net_referrer_policy = net::URLRequest::NO_REFERRER;
+ break;
case blink::WebReferrerPolicyOrigin:
- net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER;
+ net_referrer_policy = net::URLRequest::ORIGIN;
break;
case blink::WebReferrerPolicyNoReferrerWhenDowngrade:
net_referrer_policy =
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698