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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 940373002: First-Party Cookies: Wire it up as an experimental web platform feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@first-party
Patch Set: Rebase. Created 5 years, 10 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
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 958ef821d5d8759ddd48b7899200b93af724323f..37796d7c0f90f700d7cc33e84f10de2e2db9695f 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -629,11 +629,13 @@ void URLRequestHttpJob::AddCookieHeaderAndStart() {
void URLRequestHttpJob::DoLoadCookies() {
CookieOptions options;
options.set_include_httponly();
- options.set_include_first_party_only();
- // TODO(mkwst): Pipe a switch down here to allow us to decide whether we
- // should enforce "first-party only" 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());
+ else
+ options.set_include_first_party_only();
GetCookieStore()->GetCookiesWithOptionsAsync(
request_->url(), options,
« chrome/browser/net/chrome_network_delegate_unittest.cc ('K') | « net/base/network_delegate_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698