| 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 4311d4b523a090a614ba2139d0761d9c571473d8..08391df05dfa99fb178711632c2cbb882aab5c7f 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";
|
|
|
| @@ -164,12 +164,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;
|
| }
|
|
|
| @@ -183,8 +183,8 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker(
|
| Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
|
| thread_id,
|
| request_id,
|
| - WebServiceWorkerError::ErrorTypeDisabled,
|
| - base::ASCIIToUTF16(kDisabledErrorMessage)));
|
| + WebServiceWorkerError::ErrorTypeAbort,
|
| + base::ASCIIToUTF16(kShutdownErrorMessage)));
|
| return;
|
| }
|
|
|
| @@ -213,12 +213,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;
|
| }
|
|
|
| @@ -232,8 +232,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;
|
| }
|
|
|
| @@ -258,7 +258,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);
|
|
|