| 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 29 matching lines...) Expand all Loading... |
| 40 return; | 40 return; |
| 41 | 41 |
| 42 case SERVICE_WORKER_ERROR_NETWORK: | 42 case SERVICE_WORKER_ERROR_NETWORK: |
| 43 *error_type = WebServiceWorkerError::ErrorTypeNetwork; | 43 *error_type = WebServiceWorkerError::ErrorTypeNetwork; |
| 44 return; | 44 return; |
| 45 | 45 |
| 46 case SERVICE_WORKER_ERROR_SECURITY: | 46 case SERVICE_WORKER_ERROR_SECURITY: |
| 47 *error_type = WebServiceWorkerError::ErrorTypeSecurity; | 47 *error_type = WebServiceWorkerError::ErrorTypeSecurity; |
| 48 return; | 48 return; |
| 49 | 49 |
| 50 case SERVICE_WORKER_ERROR_TIMEOUT: |
| 51 *error_type = WebServiceWorkerError::ErrorTypeTimeout; |
| 52 return; |
| 53 |
| 50 case SERVICE_WORKER_ERROR_ABORT: | 54 case SERVICE_WORKER_ERROR_ABORT: |
| 51 *error_type = WebServiceWorkerError::ErrorTypeAbort; | 55 *error_type = WebServiceWorkerError::ErrorTypeAbort; |
| 52 return; | 56 return; |
| 53 | 57 |
| 54 case SERVICE_WORKER_ERROR_IPC_FAILED: | 58 case SERVICE_WORKER_ERROR_IPC_FAILED: |
| 55 case SERVICE_WORKER_ERROR_FAILED: | 59 case SERVICE_WORKER_ERROR_FAILED: |
| 56 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: | 60 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: |
| 57 case SERVICE_WORKER_ERROR_EXISTS: | 61 case SERVICE_WORKER_ERROR_EXISTS: |
| 58 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED: | 62 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED: |
| 59 case SERVICE_WORKER_ERROR_STATE: | 63 case SERVICE_WORKER_ERROR_STATE: |
| 64 case SERVICE_WORKER_ERROR_MAX_VALUE: |
| 60 // Unexpected, or should have bailed out before calling this, or we don't | 65 // Unexpected, or should have bailed out before calling this, or we don't |
| 61 // have a corresponding blink error code yet. | 66 // have a corresponding blink error code yet. |
| 62 break; // Fall through to NOTREACHED(). | 67 break; // Fall through to NOTREACHED(). |
| 63 } | 68 } |
| 64 NOTREACHED() << "Got unexpected error code: " | 69 NOTREACHED() << "Got unexpected error code: " |
| 65 << status << " " << ServiceWorkerStatusToString(status); | 70 << status << " " << ServiceWorkerStatusToString(status); |
| 66 } | 71 } |
| 67 | 72 |
| 68 } // namespace content | 73 } // namespace content |
| OLD | NEW |