| 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 44d5b796cc17791de8f48d6c013f442d26eb09ab..b7705561e80b197bebfd9d906f17e9d507b916ee 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| @@ -231,7 +231,7 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker(
|
| int provider_id,
|
| const GURL& pattern) {
|
| if (!GetContext()) {
|
| - Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
|
| + Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError(
|
| thread_id,
|
| request_id,
|
| blink::WebServiceWorkerError::ErrorTypeAbort,
|
| @@ -246,7 +246,7 @@ void ServiceWorkerDispatcherHost::OnUnregisterServiceWorker(
|
| return;
|
| }
|
| if (!provider_host->IsContextAlive()) {
|
| - Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError(
|
| + Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError(
|
| thread_id,
|
| request_id,
|
| blink::WebServiceWorkerError::ErrorTypeAbort,
|
| @@ -535,7 +535,7 @@ void ServiceWorkerDispatcherHost::UnregistrationComplete(
|
| int request_id,
|
| ServiceWorkerStatusCode status) {
|
| if (status != SERVICE_WORKER_OK) {
|
| - SendRegistrationError(thread_id, request_id, status);
|
| + SendUnregistrationError(thread_id, request_id, status);
|
| return;
|
| }
|
|
|
| @@ -554,6 +554,18 @@ void ServiceWorkerDispatcherHost::SendRegistrationError(
|
| thread_id, request_id, error_type, error_message));
|
| }
|
|
|
| +void ServiceWorkerDispatcherHost::SendUnregistrationError(
|
| + int thread_id,
|
| + int request_id,
|
| + ServiceWorkerStatusCode status) {
|
| + base::string16 error_message;
|
| + blink::WebServiceWorkerError::ErrorType error_type;
|
| + GetServiceWorkerRegistrationStatusResponse(
|
| + status, &error_type, &error_message);
|
| + Send(new ServiceWorkerMsg_ServiceWorkerUnregistrationError(
|
| + thread_id, request_id, error_type, error_message));
|
| +}
|
| +
|
| ServiceWorkerContextCore* ServiceWorkerDispatcherHost::GetContext() {
|
| return context_wrapper_->context();
|
| }
|
|
|