OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/service_worker/service_worker_status_code.h" | 5 #include "content/public/common/service_worker_status_code.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 const char* ServiceWorkerStatusToString(ServiceWorkerStatusCode status) { | 11 const char* ServiceWorkerStatusToString(ServiceWorkerStatusCode status) { |
12 switch (status) { | 12 switch (status) { |
13 case SERVICE_WORKER_OK: | 13 case SERVICE_WORKER_OK: |
14 return "Operation has succeeded"; | 14 return "Operation has succeeded"; |
15 case SERVICE_WORKER_ERROR_FAILED: | 15 case SERVICE_WORKER_ERROR_FAILED: |
(...skipping 13 matching lines...) Expand all Loading... |
29 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: | 29 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: |
30 return "ServiceWorker failed to activate"; | 30 return "ServiceWorker failed to activate"; |
31 case SERVICE_WORKER_ERROR_IPC_FAILED: | 31 case SERVICE_WORKER_ERROR_IPC_FAILED: |
32 return "IPC connection was closed or IPC error has occured"; | 32 return "IPC connection was closed or IPC error has occured"; |
33 } | 33 } |
34 NOTREACHED(); | 34 NOTREACHED(); |
35 return ""; | 35 return ""; |
36 } | 36 } |
37 | 37 |
38 } // namespace content | 38 } // namespace content |
OLD | NEW |