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

Unified Diff: net/url_request/url_request.cc

Issue 714813003: Referrer Policy: Add new policies to URLRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests. Created 6 years, 1 month 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 a2ce07eaf13057c5608b9467e377ed77a9e98240..9b4b420d52add19550843704f20383aecc702488 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -653,8 +653,10 @@ void URLRequest::StartJob(URLRequestJob* job) {
// If the referrer is secure, but the requested URL is not, the referrer
// policy should be something non-default. If you hit this, please file a
// bug.
- if (referrer_policy_ ==
- CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE &&
+ if ((referrer_policy_ ==
+ CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE ||
+ referrer_policy_ ==
+ REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN) &&
jochen (gone - plz use gerrit) 2014/11/19 10:03:48 you could also check that for the "REDUCE_.*" case
Mike West 2014/11/19 10:23:08 This got a bit complex. Still make sense?
GURL(referrer_).SchemeIsSecure() && !url().SchemeIsSecure()) {
if (!network_delegate_ ||
!network_delegate_->CancelURLRequestWithPolicyViolatingReferrerHeader(

Powered by Google App Engine
This is Rietveld 408576698