Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1540)

Unified Diff: content/browser/service_worker/service_worker_dispatcher_host.cc

Issue 339973003: Remove --enable-service-worker flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698