S13nServiceWorker: Use RenderProcessHost's network factory for shared worker script loading
When S13nServiceWorker is on and NetworkService is off, we should use content::URLLoaderFactoryImpl as the default network factory of SharedWorkerScriptLoader because AppCacheRequestHandler wouldn't work when NetworkService is off. It needs to use non-network service path when a request is fallback to network to make sure that an appcache is associated, if any. SharedWorkerScriptLoader may ask the network factory to create loaders more than once with the same |request_id| when there are redirects. However, ResourceDispatcherHostImpl, which is used by URLLoaderFactoryImpl, doesn't allow using the same |request_id| multiple times. To work around this restriction we call ResourceDispatcherHostImpl::CancellRequest() when a redirect happens while loading a shared worker script. This CL fixes following test when S13nServiceWorker is enabled: - external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html Bug: 869302 Change-Id: I5fae74439f82b3314f87a06bf9842db9df75a351 Reviewed-on: https://chromium-review.googlesource.com/1164741 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Reviewed-by:
Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#581818}
Showing
Please register or sign in to comment