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

Unified Diff: content/browser/frame_host/navigation_request.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/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index c3d2ed51d2db3ca9fbf031c45a10753007b25cb1..582a6803dfb6c9e157babc5af1d9f372ff15f5fc 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -181,6 +181,10 @@ NavigationRequest::NavigationRequest(
frame_tree_node->current_frame_host()->GetSiteInstance();
}
+ // TODO(mkwst): This is incorrect. It ought to use the definition from
+ // 'Document::firstPartyForCookies()' in Blink, which walks the ancestor tree
+ // and verifies that all origins are PSL-matches (and special-cases extension
+ // URLs).
const GURL& first_party_for_cookies =
frame_tree_node->IsMainFrame()
? common_params.url
@@ -189,8 +193,8 @@ NavigationRequest::NavigationRequest(
false : frame_tree_node->parent()->IsMainFrame();
info_.reset(new NavigationRequestInfo(
common_params, begin_params, first_party_for_cookies,
- frame_tree_node->IsMainFrame(), parent_is_main_frame,
- frame_tree_node->frame_tree_node_id(), body));
+ frame_tree_node->frame_origin(), frame_tree_node->IsMainFrame(),
+ parent_is_main_frame, frame_tree_node->frame_tree_node_id(), body));
}
NavigationRequest::~NavigationRequest() {

Powered by Google App Engine
This is Rietveld 408576698