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

Issue 2128503002: Set 'ResourceRequest::requestorOrigin' in Blink.

Created:
4 years, 5 months ago by Mike West
Modified:
4 years, 5 months ago
CC:
blink-reviews, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, gavinp+loader_chromium.org, jam, Nate Chapin, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Set 'ResourceRequest::requestorOrigin' in Blink. We're currently setting the requestor origin in 'RenderFrameImpl', which is the wrong place to encode a request's initiator data. This patch moves it to 'FrameFetchContext' in Blink, and changes the implementation to distinguish between "empty" initiators and "unique" initiators. A future patch will use that distinction to determine whether a request is user- initiated (omnibox), and should be considered "SameSite" for the purposes of cookies. BUG=625969 R=clamy@chromium.org,nasko@chromium.org

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : yay #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -19 lines) Patch
M content/child/web_url_loader_impl.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 chunk +4 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchContext.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchContext.cpp View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/BeaconLoader.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 1 chunk +15 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp View 1 2 1 chunk +6 lines, -1 line 1 comment Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.cpp View 1 2 7 chunks +7 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/PingLoader.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebSecurityOrigin.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp View 1 2 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
Mike West
jochen@: Mind taking a look at //third_party/WebKit? clamy@, nasko@: Would you mind looking at //content? ...
4 years, 5 months ago (2016-07-06 12:18:05 UTC) #2
jochen (gone - plz use gerrit)
lgtm
4 years, 5 months ago (2016-07-06 12:21:37 UTC) #3
clamy
Thanks! A few questions below. https://codereview.chromium.org/2128503002/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2128503002/diff/20001/content/renderer/render_frame_impl.cc#newcode3932 content/renderer/render_frame_impl.cc:3932: DCHECK(!request.requestorOrigin().isNull() || Just to ...
4 years, 5 months ago (2016-07-07 14:59:08 UTC) #4
nasko
4 years, 5 months ago (2016-07-18 23:34:43 UTC) #5
Apologies for the slow response. content/ hasn't changed much really : ).

https://codereview.chromium.org/2128503002/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right):

https://codereview.chromium.org/2128503002/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:762:
request.setRequestorOrigin(SecurityOrigin::create(m_document->url()));
I don't grok Blink as well, but if the document origin is unique, shouldn't we
be setting it to SecurityOrigin::createUnique()?

https://codereview.chromium.org/2128503002/diff/40001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp (right):

https://codereview.chromium.org/2128503002/diff/40001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp:49:
printf("FrameLoadRequest: %s\n",
resourceRequest.url().getString().utf8().data());
nit: Those will be gone before commit, right ;)

Powered by Google App Engine
This is Rietveld 408576698