Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 1532633003: Extension SW: Add tests that serve web_accessible_resources from a SW. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused var Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/service_worker/web_accessible_resources/webpage.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
index 92838086ce5e478ebb0971827cc9e4426e8bacfe..d5ebcf85b7df4fdaa7e75f077f3d560afbc219bd 100644
--- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -192,9 +192,9 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl
// return a opaque response which is from the other origin site and the
// script in the page can read the content.
//
- // We assume that ServiceWorker is skipped for sync requests and non-HTTP
- // familiy requests by content/ code.
- if (m_async && !request.skipServiceWorker() && request.url().protocolIsInHTTPFamily() && document.fetcher()->isControlledByServiceWorker()) {
+ // We assume that ServiceWorker is skipped for sync requests and unsupported
+ // protocol requests by content/ code.
+ if (m_async && !request.skipServiceWorker() && SchemeRegistry::shouldTreatURLSchemeAsAllowingServiceWorkers(request.url().protocol()) && document.fetcher()->isControlledByServiceWorker()) {
ResourceRequest newRequest(request);
// FetchRequestMode should be set by the caller. But the expected value
// of FetchRequestMode is not speced yet except for XHR. So we set here.
« no previous file with comments | « chrome/test/data/extensions/api_test/service_worker/web_accessible_resources/webpage.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698