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

Unified Diff: net/url_request/url_request.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
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index fa003e4dcd7d45af8a3d5bbdd7ba312596ae626b..933495d73319aa94b62f6c5ddc368e4b8fc6e22d 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -490,15 +490,6 @@ void URLRequest::SetReferrer(const std::string& referrer) {
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;
}

Powered by Google App Engine
This is Rietveld 408576698