Chromium Code Reviews| 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; |
|
kinuko
2016/06/03 09:17:16
This makes me feel if we should just skip calling
Marijn Kruisselbrink
2016/06/06 19:23:34
No particular reason, other than keeping all the c
kinuko
2016/06/07 06:55:57
Ah ok, makes sense. Yeah having decision related
|
| + |
| 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; |