Commit 316143da authored by Makoto Shimazu's avatar Makoto Shimazu Committed by Commit Bot

NetS13nSW: Skip making a handler for subresource requests

Bug: 830291
Change-Id: I1b1b6fe8c20bd1384e8e01cb9521481b38c4c1cb
Reviewed-on: https://chromium-review.googlesource.com/1025672
Commit-Queue: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553423}
parent f202d531
......@@ -238,6 +238,14 @@ void ServiceWorkerRequestHandler::InitializeHandler(
RequestContextType request_context_type,
network::mojom::RequestContextFrameType frame_type,
scoped_refptr<network::ResourceRequestBody> body) {
// S13nServiceWorker enabled, NetworkService disabled:
// for subresource requests, subresource loader should be used, but when that
// request handler falls back to network, InitializeHandler() is called.
// Since we already determined to fall back to network, don't create another
// handler.
if (ServiceWorkerUtils::IsServicificationEnabled())
return;
// Create the handler even for insecure HTTP since it's used in the
// case of redirect to HTTPS.
if (!request->url().SchemeIsHTTPOrHTTPS() &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment