Description[ServiceWorker] Introduce skip_service_worker flag and remove LOAD_BYPASS_CACHE check.
If the request is a force refresh (shift+refresh) the request should not be handled by the ServiceWorker.
https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-controller
Currently we are checking LOAD_BYPASS_CACHE flag of net::URLRequest in ServiceWorkerControlleeRequestHandler::MaybeCreateJob().
But this flag is set not only when shift+refresh but also when devtool's "Disable cache" is checked.
To distinguish them, I added skipServiceWorker flag to blink::WebURLRequest and blink::ResourceRequest in https://codereview.chromium.org/527703002/.
This cl changes the follwings
- Introduce skip_service_worker flag to content::RequestExtraData and ResourceHostMsg_Request.
- Remove the check of LOAD_BYPASS_CACHE in ServiceWorkerControlleeRequestHandler::MaybeCreateJob().
- Check skip_service_worker flag in ServiceWorkerRequestHandler::InitializeHandler() and call provider_host->SetDocumentUrl() when the request is main resource request.
TEST=none
BUG=402093
Committed: https://crrev.com/258fc42376fc25bb4fdfbc372ce53abe39988797
Cr-Commit-Position: refs/heads/master@{#293490}
Patch Set 1 #
Total comments: 2
Patch Set 2 : s/SKIP_SERVICE_WORKER/BYPASS_SERVICE_WORKER/ #Patch Set 3 : Check skipServiceWorker in RenderFrameImpl::willSendRequest() #
Total comments: 1
Patch Set 4 : Introduce skip_service_worker flag #Messages
Total messages: 28 (8 generated)
|