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

Issue 610403002: [ServiceWorker] Plumbing the request credentials mode to the ServiceWorker. [1/2 blink] (Closed)

Created:
6 years, 2 months ago by horo
Modified:
6 years, 2 months ago
CC:
blink-reviews, dglazkov+blink, jamesr, mkwst+moarreviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

[ServiceWorker] Plumbing the request credentials mode to the ServiceWorker. [1/2 blink] Currently the credentials mode of the FetchEvent's request is always 'omit'. But this should be 'same-origin' or 'include'. ex: - <img src="./test.png"> mode: no CORS credentials mode: same-origin - <img src="./test.png" crossOrigin="anonymous"> mode: CORS credentials mode: same-origin - <img src="./test.png" crossOrigin="use-credentials"> mode: CORS credentials mode: include [1/2] blink: https://codereview.chromium.org/610403002/ [2/2] chromium: https://codereview.chromium.org/615493003/ This value is passed from the renederer to the ServiceWorker in the following steps. In the renederer process: blink::ResourceRequest::setFetchCredentialsMode() // not called yet blink::ResourceRequest::m_fetchCredentialsMode content::WebURLLoaderImpl::Context::Start() blink::WebURLRequest::fetchCredentialsMode() GetFetchCredentialsMode() conetnt::RequestInfo::fetch_credentials_mode In the browser process: conetnt::RequestInfo::fetch_credentials_mode content::ResourceDispatcherHostImpl::BeginRequest() content::ServiceWorkerRequestHandler::InitializeHandler() content::ServiceWorkerProviderHost::CreateRequestHandler() content::ServiceWorkerControlleeRequestHandler::ServiceWorkerControlleeRequestHandler() content::ServiceWorkerControlleeRequestHandler::request_credentials_mode_ content::ServiceWorkerControlleeRequestHandler::MaybeCreateJob() content::ServiceWorkerURLRequestJob::ServiceWorkerURLRequestJob() content::ServiceWorkerURLRequestJob::request_credentials_mode_ content::ServiceWorkerURLRequestJob::CreateFetchRequest() content::ServiceWorkerFetchRequest::credentials_mode In the ServiceWorker process: content::ServiceWorkerFetchRequest::credentials_mode content::ServiceWorkerScriptContext::OnFetchEvent() GetBlinkFetchRequestCredentialsMode() blink::WebServiceWorkerRequest::setCredentialsMode() blink::WebServiceWorkerRequest::WebServiceWorkerRequestPrivate::m_credentialsMode blink::Request::create() blink::FetchRequestData::create() blink::FetchRequestData::m_credentials BUG=418509 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183122

Patch Set 1 #

Total comments: 2

Patch Set 2 : 80 columns #

Patch Set 3 : incorporated yhirano's comment #

Total comments: 10

Patch Set 4 : incorporated mkwst's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -13 lines) Patch
M Source/modules/serviceworkers/FetchRequestData.cpp View 1 2 3 1 chunk +9 lines, -2 lines 0 comments Download
M Source/platform/exported/WebServiceWorkerRequest.cpp View 1 2 3 chunks +14 lines, -3 lines 0 comments Download
M Source/platform/exported/WebURLRequest.cpp View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequest.h View 1 2 3 3 chunks +7 lines, -8 lines 0 comments Download
M Source/platform/network/ResourceRequest.cpp View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequestTest.cpp View 1 2 5 chunks +5 lines, -0 lines 0 comments Download
M public/platform/WebServiceWorkerRequest.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M public/platform/WebURLRequest.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
horo
yhirano@ Could you please review?
6 years, 2 months ago (2014-09-29 11:20:34 UTC) #2
yhirano
On 2014/09/29 11:20:34, horo wrote: > yhirano@ > Could you please review? Can you please ...
6 years, 2 months ago (2014-09-29 11:39:46 UTC) #3
horo
On 2014/09/29 11:39:46, yhirano wrote: > On 2014/09/29 11:20:34, horo wrote: > > yhirano@ > ...
6 years, 2 months ago (2014-09-30 03:31:03 UTC) #4
yhirano
What you are doing in this series of CLs is restoring the original credential mode ...
6 years, 2 months ago (2014-09-30 05:18:52 UTC) #5
horo
> What you are doing in this series of CLs is restoring the original credential ...
6 years, 2 months ago (2014-09-30 07:14:08 UTC) #6
horo
> > I'm not sure we can restore the credential mode for the general case ...
6 years, 2 months ago (2014-09-30 07:20:43 UTC) #7
horo
> I'm not sure we can restore the credential mode for the general case - ...
6 years, 2 months ago (2014-09-30 09:22:09 UTC) #8
yhirano
On 2014/09/30 09:22:09, horo wrote: > > I'm not sure we can restore the credential ...
6 years, 2 months ago (2014-10-01 04:54:18 UTC) #9
horo
On 2014/10/01 04:54:18, yhirano wrote: > On 2014/09/30 09:22:09, horo wrote: > > > I'm ...
6 years, 2 months ago (2014-10-01 05:18:31 UTC) #10
yhirano
On 2014/10/01 05:18:31, horo wrote: > On 2014/10/01 04:54:18, yhirano wrote: > > On 2014/09/30 ...
6 years, 2 months ago (2014-10-01 06:37:31 UTC) #11
horo
> I think we should set the credentials mode correctly in existing resource > requests. ...
6 years, 2 months ago (2014-10-01 06:46:44 UTC) #12
yhirano
On 2014/10/01 06:46:44, horo wrote: > > You need to add a member to Request. ...
6 years, 2 months ago (2014-10-01 08:00:12 UTC) #13
horo
jochen@ Could you please review this?
6 years, 2 months ago (2014-10-01 08:02:16 UTC) #15
Mike West
LGTM with nits. https://codereview.chromium.org/610403002/diff/40001/Source/modules/serviceworkers/FetchRequestData.cpp File Source/modules/serviceworkers/FetchRequestData.cpp (right): https://codereview.chromium.org/610403002/diff/40001/Source/modules/serviceworkers/FetchRequestData.cpp#newcode56 Source/modules/serviceworkers/FetchRequestData.cpp:56: ASSERT_NOT_REACHED(); Why add the default? Isn't ...
6 years, 2 months ago (2014-10-01 08:16:34 UTC) #17
horo
https://codereview.chromium.org/610403002/diff/40001/Source/modules/serviceworkers/FetchRequestData.cpp File Source/modules/serviceworkers/FetchRequestData.cpp (right): https://codereview.chromium.org/610403002/diff/40001/Source/modules/serviceworkers/FetchRequestData.cpp#newcode56 Source/modules/serviceworkers/FetchRequestData.cpp:56: ASSERT_NOT_REACHED(); On 2014/10/01 08:16:34, Mike West wrote: > Why ...
6 years, 2 months ago (2014-10-01 08:32:22 UTC) #18
Mike West
On 2014/10/01 08:32:22, horo wrote: > https://codereview.chromium.org/610403002/diff/40001/public/platform/WebURLRequest.h#newcode68 > public/platform/WebURLRequest.h:68: // > http://fetch.spec.whatwg.org/#concept-request-context > On 2014/10/01 ...
6 years, 2 months ago (2014-10-01 08:46:02 UTC) #19
jochen (gone - plz use gerrit)
lgtm
6 years, 2 months ago (2014-10-02 07:26:10 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/610403002/20002
6 years, 2 months ago (2014-10-02 07:44:50 UTC) #22
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 08:26:44 UTC) #23
Message was sent while issue was closed.
Committed patchset #4 (id:20002) as 183122

Powered by Google App Engine
This is Rietveld 408576698