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_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ | 6 #define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 // Push registration success/error codes for internal use & reporting in UMA. | 10 // Push registration success/error codes for internal use & reporting in UMA. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // A successful registration was already cached in Service Worker storage. | 42 // A successful registration was already cached in Service Worker storage. |
43 PUSH_REGISTRATION_STATUS_SUCCESS_FROM_CACHE = 8, | 43 PUSH_REGISTRATION_STATUS_SUCCESS_FROM_CACHE = 8, |
44 | 44 |
45 // Registration failed due to a network error. | 45 // Registration failed due to a network error. |
46 PUSH_REGISTRATION_STATUS_NETWORK_ERROR = 9, | 46 PUSH_REGISTRATION_STATUS_NETWORK_ERROR = 9, |
47 | 47 |
48 // Registration failed because the push service is not available in incognito, | 48 // Registration failed because the push service is not available in incognito, |
49 // but we tell JS that permission was denied to not reveal incognito. | 49 // but we tell JS that permission was denied to not reveal incognito. |
50 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED = 10, | 50 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED = 10, |
51 | 51 |
| 52 // Registration failed because the public key could not be retrieved. |
| 53 PUSH_REGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE = 11, |
| 54 |
52 // NOTE: Do not renumber these as that would confuse interpretation of | 55 // NOTE: Do not renumber these as that would confuse interpretation of |
53 // previously logged data. When making changes, also update the enum list | 56 // previously logged data. When making changes, also update the enum list |
54 // in tools/metrics/histograms/histograms.xml to keep it in sync, and | 57 // in tools/metrics/histograms/histograms.xml to keep it in sync, and |
55 // update PUSH_REGISTRATION_STATUS_LAST below. | 58 // update PUSH_REGISTRATION_STATUS_LAST below. |
56 | 59 |
57 PUSH_REGISTRATION_STATUS_LAST = | 60 PUSH_REGISTRATION_STATUS_LAST = |
58 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED | 61 PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED |
59 }; | 62 }; |
60 | 63 |
61 // Push unregistration success/error codes for internal use & reporting in UMA. | 64 // Push unregistration success/error codes for internal use & reporting in UMA. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Getting the registration failed because we failed to read from storage. | 108 // Getting the registration failed because we failed to read from storage. |
106 PUSH_GETREGISTRATION_STATUS_STORAGE_ERROR = 2, | 109 PUSH_GETREGISTRATION_STATUS_STORAGE_ERROR = 2, |
107 | 110 |
108 // Getting the registration failed because there is no push registration. | 111 // Getting the registration failed because there is no push registration. |
109 PUSH_GETREGISTRATION_STATUS_REGISTRATION_NOT_FOUND = 3, | 112 PUSH_GETREGISTRATION_STATUS_REGISTRATION_NOT_FOUND = 3, |
110 | 113 |
111 // Getting the registration failed because the push service isn't available in | 114 // Getting the registration failed because the push service isn't available in |
112 // incognito, but we tell JS registration not found to not reveal incognito. | 115 // incognito, but we tell JS registration not found to not reveal incognito. |
113 PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND = 4, | 116 PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND = 4, |
114 | 117 |
| 118 // Registration failed because the public key could not be retrieved. |
| 119 PUSH_GETREGISTRATION_STATUS_PUBLIC_KEY_UNAVAILABLE = 5, |
| 120 |
115 // NOTE: Do not renumber these as that would confuse interpretation of | 121 // NOTE: Do not renumber these as that would confuse interpretation of |
116 // previously logged data. When making changes, also update the enum list | 122 // previously logged data. When making changes, also update the enum list |
117 // in tools/metrics/histograms/histograms.xml to keep it in sync, and | 123 // in tools/metrics/histograms/histograms.xml to keep it in sync, and |
118 // update PUSH_GETREGISTRATION_STATUS_LAST below. | 124 // update PUSH_GETREGISTRATION_STATUS_LAST below. |
119 | 125 |
120 PUSH_GETREGISTRATION_STATUS_LAST = | 126 PUSH_GETREGISTRATION_STATUS_LAST = |
121 PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND | 127 PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND |
122 }; | 128 }; |
123 | 129 |
124 // Push message event success/error codes for internal use & reporting in UMA. | 130 // Push message event success/error codes for internal use & reporting in UMA. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED | 187 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED |
182 }; | 188 }; |
183 | 189 |
184 const char* PushRegistrationStatusToString(PushRegistrationStatus status); | 190 const char* PushRegistrationStatusToString(PushRegistrationStatus status); |
185 | 191 |
186 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); | 192 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); |
187 | 193 |
188 } // namespace content | 194 } // namespace content |
189 | 195 |
190 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ | 196 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
OLD | NEW |