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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 1411813003: Teach URLRequest about initiator checks for First-Party-Only cookies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 years, 11 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: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index d671e2b715abefdc166efd1417e480ffc84f137b..529b9781866740fcf1e0309c8fa9484466545252 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1331,6 +1331,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
new_request->set_method(request_data.method);
new_request->set_first_party_for_cookies(
request_data.first_party_for_cookies);
+ new_request->set_initiator(request_data.request_initiator);
// If the request is a MAIN_FRAME request, the first-party URL gets updated on
// redirects.
@@ -2119,6 +2120,7 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
new_request->set_method(info.begin_params.method);
new_request->set_first_party_for_cookies(
info.first_party_for_cookies);
+ new_request->set_initiator(info.request_initiator);
if (info.is_main_frame) {
new_request->set_first_party_url_policy(
net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);

Powered by Google App Engine
This is Rietveld 408576698