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 964a393f8ebbaaa389338e8348ddd76d2ecd309b..2adaf45a7eb3727bfe1976e7a09ef258c1ccb143 100644 |
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc |
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc |
@@ -26,8 +26,8 @@ namespace content { |
namespace { |
-const char kDisabledErrorMessage[] = |
- "ServiceWorker is disabled"; |
+const char kShutdownErrorMessage[] = |
+ "The Service Worker system has shutdown."; |
const char kDomainMismatchErrorMessage[] = |
"Scope and scripts do not have the same origin"; |
@@ -168,12 +168,12 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker( |
int provider_id, |
const GURL& pattern, |
const GURL& script_url) { |
- if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled()) { |
+ if (!GetContext()) { |
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( |
thread_id, |
request_id, |
- WebServiceWorkerError::ErrorTypeDisabled, |
- base::ASCIIToUTF16(kDisabledErrorMessage))); |
+ WebServiceWorkerError::ErrorTypeAbort, |
+ base::ASCIIToUTF16(kShutdownErrorMessage))); |
return; |
} |
@@ -187,8 +187,8 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker( |
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( |
thread_id, |
request_id, |
- WebServiceWorkerError::ErrorTypeDisabled, |
- base::ASCIIToUTF16(kDisabledErrorMessage))); |
+ WebServiceWorkerError::ErrorTypeAbort, |
+ base::ASCIIToUTF16(kShutdownErrorMessage))); |
return; |
} |
@@ -217,12 +217,12 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker( |
int request_id, |
int provider_id, |
const GURL& pattern) { |
- if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled()) { |
+ if (!GetContext()) { |
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( |
thread_id, |
request_id, |
- blink::WebServiceWorkerError::ErrorTypeDisabled, |
- base::ASCIIToUTF16(kDisabledErrorMessage))); |
+ blink::WebServiceWorkerError::ErrorTypeAbort, |
+ base::ASCIIToUTF16(kShutdownErrorMessage))); |
return; |
} |
@@ -236,8 +236,8 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker( |
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( |
thread_id, |
request_id, |
- blink::WebServiceWorkerError::ErrorTypeDisabled, |
- base::ASCIIToUTF16(kDisabledErrorMessage))); |
+ blink::WebServiceWorkerError::ErrorTypeAbort, |
+ base::ASCIIToUTF16(kShutdownErrorMessage))); |
return; |
} |
@@ -262,7 +262,7 @@ void ServiceWorkerDispatcherHost::OnPostMessageToWorker( |
int handle_id, |
const base::string16& message, |
const std::vector<int>& sent_message_port_ids) { |
- if (!GetContext() || !ServiceWorkerUtils::IsFeatureEnabled()) |
+ if (!GetContext()) |
return; |
ServiceWorkerHandle* handle = handles_.Lookup(handle_id); |