Chromium Code Reviews| Index: net/url_request/url_request_http_job.cc |
| diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
| index e35938088eaf77926a08624e14578e8666249ec8..806ef869fee419d475978c05b0b63e789d0f32e1 100644 |
| --- a/net/url_request/url_request_http_job.cc |
| +++ b/net/url_request/url_request_http_job.cc |
| @@ -687,7 +687,9 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() { |
| // |
| // * Include both "strict" and "lax" same-site cookies if the request's |
| // |url|, |initiator|, and |first_party_for_cookies| all have the same |
| - // registrable domain. |
| + // registrable domain. Note: this also covers the case of a request |
| + // without an initiatore (only happens for browser-initiated main frame |
|
nasko
2016/12/16 20:32:42
nit: initiator, no e needed at the end.
clamy
2016/12/21 14:54:19
Done.
|
| + // navigations). |
| // |
| // * Include only "lax" same-site cookies if the request's |URL| and |
| // |first_party_for_cookies| have the same registrable domain, _and_ the |
| @@ -700,7 +702,7 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() { |
| if (registry_controlled_domains::SameDomainOrHost( |
| request_->url(), request_->first_party_for_cookies(), |
| registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)) { |
| - if (request_->initiator() && |
| + if (!request_->initiator() || |
| registry_controlled_domains::SameDomainOrHost( |
| request_->url(), request_->initiator().value().GetURL(), |
| registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)) { |