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 49f45bb853495cff44e0648f343b1287d03160dc..33b29a6e19c17bb32848b550af27fedb9b36e1df 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -630,9 +630,12 @@ void URLRequestHttpJob::DoLoadCookies() { |
CookieOptions options; |
options.set_include_httponly(); |
- // TODO(mkwst): Pipe a switch down here to allow us to decide whether we |
- // should enforce "first-party" cookies or not (by setting |options|'s |
- // first-party-url to the first-party-for-cookies value. crbug.com/459154 |
+ // TODO(mkwst): Drop this `if` once we decide whether or not to ship |
+ // first-party cookies: https://crbug.com/459154 |
+ if (network_delegate()->FirstPartyCookieExperimentEnabled()) |
+ options.set_first_party_url(request_->first_party_for_cookies()); |
mmenke
2015/02/20 16:30:39
As-is, these lines could be removed, or always set
mmenke
2015/02/20 16:30:39
Ahh...This makes sense. I hadn't realized it was
|
+ else |
+ options.set_include_all_first_party(); |
GetCookieStore()->GetCookiesWithOptionsAsync( |
request_->url(), options, |