Use network::mojom::kURLLoadOptionSniffMimeType everywhere
This CL is to reflect kURLLoadOptionSniffMimeType when making ResourceHandlers. If there is no option to request mime sniffing, it won't create MimeSniffingResourceHandler. ServiceWorkerNewScriptLoader removes the mime sniffing option, so requests for service worker scripts can skip mime sniffing in RDHI. Context of this CL: Before NetS13nServiceWorker, network requests for service worker scripts is handled by ServiceWorkerWriteToCacheJob, and it rejects responses without mime type. It results in network error and none of ResourceHandlers handle the response. After NetS13nServiceWorker, network requests coming from the renderer reach ServiceWorkerNewScriptLoader first, and eventually they are routed to ResourceDispatcherHostImpl. It means that ResourceDispatcherHostImpl works as usual and MimeSniffingResourceHandler in RDHI handles the response. This CL helps to avoid the script response is handled by MimeSniffingResourceHandler. Bug: 871654 Cq-Include-Trybots: luci.chromium.try:linux_mojo Change-Id: Ia7c7885157029be16a3a4669cf204ac85232f1b6 Reviewed-on: https://chromium-review.googlesource.com/1179482Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#585398}
Showing
Please register or sign in to comment