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

Unified Diff: net/url_request/url_request.cc

Issue 2108423002: Revert of Apply Referrer-Policy header when following redirects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 0c1d5f4c197b9ffb799fff6bb274909163fd406d..7fac9c77caf2a50c1052cc72ac4880ea96dbac05 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -479,15 +479,6 @@
void URLRequest::set_referrer_policy(ReferrerPolicy referrer_policy) {
DCHECK(!is_pending_);
- // External callers shouldn't be setting NO_REFERRER or
- // ORIGIN. |referrer_policy_| is only applied during server redirects,
- // so external callers must set the referrer themselves using
- // SetReferrer() for the initial request. Once the referrer has been
- // set to an origin or to an empty string, there is no point in
- // setting the policy to NO_REFERRER or ORIGIN as it would have the
- // same effect as using NEVER_CLEAR_REFERRER across redirects.
- DCHECK_NE(referrer_policy, NO_REFERRER);
- DCHECK_NE(referrer_policy, ORIGIN);
referrer_policy_ = referrer_policy;
}
@@ -987,7 +978,6 @@
}
referrer_ = redirect_info.new_referrer;
- referrer_policy_ = redirect_info.new_referrer_policy;
first_party_for_cookies_ = redirect_info.new_first_party_for_cookies;
token_binding_referrer_ = redirect_info.referred_token_binding_host;
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698