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

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

Issue 1278713002: Service Worker: Add missing ServiceWorkerDispatcherHost::SendUpdateError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « content/browser/service_worker/service_worker_dispatcher_host.h ('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 f1ee3e7ec5112814edb05ac63361907f595f089e..46eb314ac701f30ead758d5a401f75f539f9cc12 100644
--- a/content/browser/service_worker/service_worker_dispatcher_host.cc
+++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
@@ -888,7 +888,7 @@ void ServiceWorkerDispatcherHost::UpdateComplete(
return; // The provider has already been destroyed.
if (status != SERVICE_WORKER_OK) {
- SendRegistrationError(thread_id, request_id, status, status_message);
+ SendUpdateError(thread_id, request_id, status, status_message);
return;
}
@@ -1223,6 +1223,20 @@ void ServiceWorkerDispatcherHost::SendRegistrationError(
base::ASCIIToUTF16(kServiceWorkerRegisterErrorPrefix) + error_message));
}
+void ServiceWorkerDispatcherHost::SendUpdateError(
+ int thread_id,
+ int request_id,
+ ServiceWorkerStatusCode status,
+ const std::string& status_message) {
+ base::string16 error_message;
+ blink::WebServiceWorkerError::ErrorType error_type;
+ GetServiceWorkerRegistrationStatusResponse(status, status_message,
+ &error_type, &error_message);
+ Send(new ServiceWorkerMsg_ServiceWorkerUpdateError(
+ thread_id, request_id, error_type,
+ base::ASCIIToUTF16(kServiceWorkerUpdateErrorPrefix) + error_message));
+}
+
void ServiceWorkerDispatcherHost::SendUnregistrationError(
int thread_id,
int request_id,
« no previous file with comments | « content/browser/service_worker/service_worker_dispatcher_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698