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 #ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ | 6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 enum PushMessagingStatus { | 10 enum PushMessagingStatus { |
11 // Everything is ok. | 11 // Everything is ok. |
12 PUSH_MESSAGING_STATUS_OK, | 12 PUSH_MESSAGING_STATUS_OK, |
13 | 13 |
14 // Registration failed because there is no Service Worker. | 14 // Registration failed because there is no Service Worker. |
15 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_NO_SERVICE_WORKER, | 15 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_NO_SERVICE_WORKER, |
16 | 16 |
17 // Registration failed because the push service is not available. | 17 // Registration failed because the push service is not available. |
18 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_NOT_AVAILABLE, | 18 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_NOT_AVAILABLE, |
19 | 19 |
20 // Registration failed because the maximum number of registratons has been | 20 // Registration failed because the maximum number of registratons has been |
21 // reached. | 21 // reached. |
22 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_LIMIT_REACHED, | 22 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_LIMIT_REACHED, |
23 | 23 |
24 // Registration failed because permission was denied. | 24 // Registration failed because permission was denied. |
25 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_PERMISSION_DENIED, | 25 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_PERMISSION_DENIED, |
26 | 26 |
27 // Registration failed in the push service implemented by the embedder. | 27 // Registration failed in the push service implemented by the embedder. |
28 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_ERROR, | 28 PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_ERROR, |
29 | 29 |
| 30 // The message could not be delivered because no service worker was found. |
| 31 PUSH_MESSAGING_STATUS_MESSAGE_DELIVERY_FAILED_NO_SERVICE_WORKER, |
| 32 |
| 33 // The message could not be delivered because of a service worker error. |
| 34 PUSH_MESSAGING_STATUS_MESSAGE_DELIVERY_FAILED_SERVICE_WORKER_ERROR, |
| 35 |
30 // Generic error (a more specific error should be used whenever possible). | 36 // Generic error (a more specific error should be used whenever possible). |
31 PUSH_MESSAGING_STATUS_ERROR, | 37 PUSH_MESSAGING_STATUS_ERROR, |
32 | 38 |
33 // Used for IPC message range checks. | 39 // Used for IPC message range checks. |
34 PUSH_MESSAGING_STATUS_LAST = PUSH_MESSAGING_STATUS_ERROR | 40 PUSH_MESSAGING_STATUS_LAST = PUSH_MESSAGING_STATUS_ERROR |
35 }; | 41 }; |
36 | 42 |
37 const char* PushMessagingStatusToString(PushMessagingStatus status); | 43 const char* PushMessagingStatusToString(PushMessagingStatus status); |
38 | 44 |
39 } // namespace content | 45 } // namespace content |
40 | 46 |
41 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ | 47 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
OLD | NEW |