Description[ServiceWorker] Plumbing the request credentials mode to the ServiceWorker. [2/2 chromium]
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://crrev.com/89252e8f8b163ac1c8715882e3651aa79e6cbfb6
Cr-Commit-Position: refs/heads/master@{#297812}
Patch Set 1 #Patch Set 2 : incorporated yhirano's comment in codereview.chromium.org/610403002 #Patch Set 3 : fix GetFetchCredentialsMode #
Total comments: 8
Patch Set 4 : IPCResourceLoaderBridge::IPCResourceLoaderBridge() #Patch Set 5 : -#include "net/base/load_flags.h" #Patch Set 6 : Add TODO comment #Patch Set 7 : rebase #Messages
Total messages: 27 (9 generated)
|