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 #
Messages
Total messages: 23 (4 generated)
|