| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index a10d6b04d0ea6d03d483c30eafca6bda8ae38b1b..027b5a62183d12af29a1e4285ea9da43a90b6056 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -6286,6 +6286,14 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
|
|
|
| blink::WebURLRequest& request = info.url_request;
|
|
|
| + // Set RequestorOrigin and FirstPartyForCookies
|
| + WebDocument frame_document = frame_->GetDocument();
|
| + if (request.GetFrameType() == blink::WebURLRequest::kFrameTypeTopLevel)
|
| + request.SetFirstPartyForCookies(request.Url());
|
| + else
|
| + request.SetFirstPartyForCookies(frame_document.FirstPartyForCookies());
|
| + request.SetRequestorOrigin(frame_document.GetSecurityOrigin());
|
| +
|
| // Note: At this stage, the goal is to apply all the modifications the
|
| // renderer wants to make to the request, and then send it to the browser, so
|
| // that the actual network request can be started. Ideally, all such
|
| @@ -6298,14 +6306,6 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
|
| // else in blink.
|
| WillSendRequest(request);
|
|
|
| - // Set RequestorOrigin and FirstPartyForCookies.
|
| - WebDocument frame_document = frame_->GetDocument();
|
| - if (request.GetFrameType() == blink::WebURLRequest::kFrameTypeTopLevel)
|
| - request.SetFirstPartyForCookies(request.Url());
|
| - else
|
| - request.SetFirstPartyForCookies(frame_document.FirstPartyForCookies());
|
| - request.SetRequestorOrigin(frame_document.GetSecurityOrigin());
|
| -
|
| // Update the transition type of the request for client side redirects.
|
| if (!info.url_request.GetExtraData())
|
| info.url_request.SetExtraData(new RequestExtraData());
|
|
|