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

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

Issue 2377603002: Disable ServiceWorker when JS is disabled (Closed)
Patch Set: Updated comments, removed the mock headers and renamed the function Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2c19cabaf95d343fb674a4d76c1941bdd3ac7b8a..8c8bead8c452f96e28ed0da1d3a422f0c4313f42 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -347,7 +347,7 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker(
pattern, provider_host->topmost_frame_url(), resource_context_,
render_process_id_, provider_host->frame_id())) {
Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
- thread_id, request_id, WebServiceWorkerError::ErrorTypeUnknown,
+ thread_id, request_id, WebServiceWorkerError::ErrorTypeDisabled,
base::ASCIIToUTF16(kServiceWorkerRegisterErrorPrefix) +
base::ASCIIToUTF16(kUserDeniedPermissionMessage)));
return;
@@ -425,7 +425,7 @@ void ServiceWorkerDispatcherHost::OnUpdateServiceWorker(
registration->pattern(), provider_host->topmost_frame_url(),
resource_context_, render_process_id_, provider_host->frame_id())) {
Send(new ServiceWorkerMsg_ServiceWorkerUpdateError(
- thread_id, request_id, WebServiceWorkerError::ErrorTypeUnknown,
+ thread_id, request_id, WebServiceWorkerError::ErrorTypeDisabled,
base::ASCIIToUTF16(kServiceWorkerUpdateErrorPrefix) +
base::ASCIIToUTF16(kUserDeniedPermissionMessage)));
return;
@@ -512,7 +512,7 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker(
registration->pattern(), provider_host->topmost_frame_url(),
resource_context_, render_process_id_, provider_host->frame_id())) {
Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError(
- thread_id, request_id, WebServiceWorkerError::ErrorTypeUnknown,
+ thread_id, request_id, WebServiceWorkerError::ErrorTypeDisabled,
base::ASCIIToUTF16(kUserDeniedPermissionMessage)));
return;
}
@@ -588,7 +588,7 @@ void ServiceWorkerDispatcherHost::OnGetRegistration(
provider_host->document_url(), provider_host->topmost_frame_url(),
resource_context_, render_process_id_, provider_host->frame_id())) {
Send(new ServiceWorkerMsg_ServiceWorkerGetRegistrationError(
- thread_id, request_id, WebServiceWorkerError::ErrorTypeUnknown,
+ thread_id, request_id, WebServiceWorkerError::ErrorTypeDisabled,
base::ASCIIToUTF16(kServiceWorkerGetRegistrationErrorPrefix) +
base::ASCIIToUTF16(kUserDeniedPermissionMessage)));
return;
@@ -655,7 +655,7 @@ void ServiceWorkerDispatcherHost::OnGetRegistrations(int thread_id,
provider_host->document_url(), provider_host->topmost_frame_url(),
resource_context_, render_process_id_, provider_host->frame_id())) {
Send(new ServiceWorkerMsg_ServiceWorkerGetRegistrationsError(
- thread_id, request_id, WebServiceWorkerError::ErrorTypeUnknown,
+ thread_id, request_id, WebServiceWorkerError::ErrorTypeDisabled,
base::ASCIIToUTF16(kServiceWorkerGetRegistrationsErrorPrefix) +
base::ASCIIToUTF16(kUserDeniedPermissionMessage)));
return;
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698