Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index cfce1ee9392a594905860c1e3c5027f6c39cb55e..3d89f8ff46d4669bcd5aae03ae7821a37515dab5 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -2353,6 +2353,15 @@ void RenderFrameImpl::willSendRequest( |
if (request.url().isEmpty()) |
return; |
+ // Set the first party for cookies url if it has not been set yet (new |
+ // requests). For redirects, it is updated by WebURLLoaderImpl. |
+ if (request.firstPartyForCookies().isEmpty()) { |
+ if (request.targetType() == blink::WebURLRequest::TargetIsMainFrame) |
+ request.setFirstPartyForCookies(request.url()); |
+ else |
+ request.setFirstPartyForCookies(frame->top()->document().url()); |
ppi
2014/06/05 15:27:16
Does it matter that we changed from ::firstPartyFo
clamy
2014/06/05 15:33:27
firstPartyForCookies is not in the public blink AP
ppi
2014/06/05 15:41:43
I agree it's probably fine, but the function seems
clamy
2014/06/05 16:05:00
My bad, missed it. In that case I agree that it is
|
+ } |
+ |
WebFrame* top_frame = frame->top(); |
if (!top_frame) |
top_frame = frame; |