Chromium Code Reviews| Index: net/url_request/url_request.cc |
| diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc |
| index 6b0124730d5011fec92ddbf733be8f24f2db6ffa..437d8c7325b0865edeff0dc8e09c66803f8fcf83 100644 |
| --- a/net/url_request/url_request.cc |
| +++ b/net/url_request/url_request.cc |
| @@ -684,6 +684,13 @@ void URLRequest::StartJob(URLRequestJob* job) { |
| response_info_.was_cached = false; |
| + // 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. |
| + CHECK(!(GURL(referrer_).SchemeIsSecure() && !url().SchemeIsSecure()) || |
| + referrer_policy_ != |
| + CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE); |
|
mef
2013/12/16 16:39:01
I'd keep it as DCHECK to avoid non-critical crashe
jochen (gone - plz use gerrit)
2013/12/16 19:25:51
IMO a DCHECK is almost pointless. And it is a cri
|
| + |
| // Don't allow errors to be sent from within Start(). |
| // TODO(brettw) this may cause NotifyDone to be sent synchronously, |
| // we probably don't want this: they should be sent asynchronously so |