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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 1253353004: WIP: Teach "First-Party-Only" cookies about the requestor origin. Base URL: https://chromium.googlesource.com/chromium/src.git@cookie-options
Patch Set: Created 5 years, 5 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30bd8e220d81a189cad979ccb2f9b6f8f2383242..b095464a8189c1338e2d41043b195de1fc081afe 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -659,10 +659,12 @@ void URLRequestHttpJob::DoLoadCookies() {
// TODO(mkwst): Drop this `if` once we decide whether or not to ship
// first-party cookies: https://crbug.com/459154
if (network_delegate() &&
- network_delegate()->FirstPartyOnlyCookieExperimentEnabled())
+ network_delegate()->FirstPartyOnlyCookieExperimentEnabled()) {
options.set_first_party_url(request_->first_party_for_cookies());
- else
+ options.set_requestor_origin(request_->requestor_origin());
+ } else {
options.set_include_first_party_only();
+ }
request_->context()->cookie_store()->GetCookiesWithOptionsAsync(
request_->url(), options, base::Bind(&URLRequestHttpJob::OnCookiesLoaded,
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698