| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/service_worker/service_worker_registration_status.h" | 5 #include "content/browser/service_worker/service_worker_registration_status.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 return; | 28 return; |
| 29 | 29 |
| 30 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: | 30 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: |
| 31 *error_type = WebServiceWorkerError::ErrorTypeActivate; | 31 *error_type = WebServiceWorkerError::ErrorTypeActivate; |
| 32 return; | 32 return; |
| 33 | 33 |
| 34 case SERVICE_WORKER_ERROR_NOT_FOUND: | 34 case SERVICE_WORKER_ERROR_NOT_FOUND: |
| 35 *error_type = WebServiceWorkerError::ErrorTypeNotFound; | 35 *error_type = WebServiceWorkerError::ErrorTypeNotFound; |
| 36 return; | 36 return; |
| 37 | 37 |
| 38 case SERVICE_WORKER_ERROR_NETWORK: |
| 39 *error_type = WebServiceWorkerError::ErrorTypeNetwork; |
| 40 return; |
| 41 |
| 42 case SERVICE_WORKER_ERROR_SECURITY: |
| 43 *error_type = WebServiceWorkerError::ErrorTypeSecurity; |
| 44 return; |
| 45 |
| 38 case SERVICE_WORKER_ERROR_ABORT: | 46 case SERVICE_WORKER_ERROR_ABORT: |
| 39 case SERVICE_WORKER_ERROR_IPC_FAILED: | 47 case SERVICE_WORKER_ERROR_IPC_FAILED: |
| 40 case SERVICE_WORKER_ERROR_FAILED: | 48 case SERVICE_WORKER_ERROR_FAILED: |
| 41 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: | 49 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: |
| 42 case SERVICE_WORKER_ERROR_EXISTS: | 50 case SERVICE_WORKER_ERROR_EXISTS: |
| 43 // Unexpected, or should have bailed out before calling this, or we don't | 51 // Unexpected, or should have bailed out before calling this, or we don't |
| 44 // have a corresponding blink error code yet. | 52 // have a corresponding blink error code yet. |
| 45 break; // Fall through to NOTREACHED(). | 53 break; // Fall through to NOTREACHED(). |
| 46 } | 54 } |
| 47 NOTREACHED() << "Got unexpected error code: " | 55 NOTREACHED() << "Got unexpected error code: " |
| 48 << status << " " << ServiceWorkerStatusToString(status); | 56 << status << " " << ServiceWorkerStatusToString(status); |
| 49 } | 57 } |
| 50 | 58 |
| 51 } // namespace content | 59 } // namespace content |
| OLD | NEW |