| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ |
| 6 #define CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 // Generic service worker operation statuses. |
| 13 enum ServiceWorkerStatusCode { |
| 14 // Operation succeeded. |
| 15 SERVICE_WORKER_OK, |
| 16 |
| 17 // Generic operation error (more specific error code should be used in |
| 18 // general). |
| 19 SERVICE_WORKER_ERROR_FAILED, |
| 20 |
| 21 // Operation was aborted (e.g. due to context or child process shutdown). |
| 22 SERVICE_WORKER_ERROR_ABORT, |
| 23 |
| 24 // Starting a new service worker script context failed. |
| 25 SERVICE_WORKER_ERROR_START_WORKER_FAILED, |
| 26 |
| 27 // Could not find a renderer process to run a service worker. |
| 28 SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND, |
| 29 |
| 30 // Install event handling failed. |
| 31 SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED, |
| 32 |
| 33 // Activate event handling failed. |
| 34 SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED, |
| 35 }; |
| 36 |
| 37 CONTENT_EXPORT const char* ServiceWorkerStatusToString( |
| 38 ServiceWorkerStatusCode code); |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_ |
| OLD | NEW |