Index: content/browser/service_worker/service_worker_dispatcher_host.cc |
diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc |
index 3340f871853af14d17d1567f3b6680e016326c36..eea1cb75a70f70e3716db98c56881eee269324c3 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
@@ -8,6 +8,7 @@ |
#include "base/profiler/scoped_tracker.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/trace_event/trace_event.h" |
+#include "chrome/common/origin_util.h" |
#include "content/browser/message_port_message_filter.h" |
#include "content/browser/message_port_service.h" |
#include "content/browser/service_worker/embedded_worker_registry.h" |
@@ -54,8 +55,7 @@ bool AllOriginsMatch(const GURL& url_a, const GURL& url_b, const GURL& url_c) { |
// consistent with Blink's |
// SecurityOrigin::canAccessFeatureRequiringSecureOrigin. |
bool OriginCanAccessServiceWorkers(const GURL& url) { |
- return url.SchemeIsHTTPOrHTTPS() && |
- (url.SchemeIsSecure() || net::IsLocalhost(url.host())); |
+ return url.SchemeIsHTTPOrHTTPS() && IsOriginSecure(url); |
} |
bool CanRegisterServiceWorker(const GURL& document_url, |