Index: content/browser/service_worker/foreign_fetch_request_handler.cc |
diff --git a/content/browser/service_worker/foreign_fetch_request_handler.cc b/content/browser/service_worker/foreign_fetch_request_handler.cc |
index 59fe4846dfdedca40e239a131337244232f20f80..c712064a0b839da17636abf67ff3286bda5f20c7 100644 |
--- a/content/browser/service_worker/foreign_fetch_request_handler.cc |
+++ b/content/browser/service_worker/foreign_fetch_request_handler.cc |
@@ -58,11 +58,15 @@ void ForeignFetchRequestHandler::InitializeHandler( |
ResourceType resource_type, |
RequestContextType request_context_type, |
RequestContextFrameType frame_type, |
- scoped_refptr<ResourceRequestBody> body) { |
+ scoped_refptr<ResourceRequestBody> body, |
+ bool initiated_in_secure_context) { |
if (!context_wrapper) { |
return; |
} |
+ if (!initiated_in_secure_context) |
+ return; |
+ |
if (!context_wrapper->OriginHasForeignFetchRegistrations( |
request->url().GetOrigin())) { |
return; |
@@ -70,6 +74,7 @@ void ForeignFetchRequestHandler::InitializeHandler( |
if (request->initiator().IsSameOriginWith(url::Origin(request->url()))) |
return; |
+ |
if (ServiceWorkerUtils::IsMainResourceType(resource_type)) |
return; |