| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // The message could not be delivered because of a service worker error. | 214 // The message could not be delivered because of a service worker error. |
| 215 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR = 5, | 215 PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR = 5, |
| 216 | 216 |
| 217 // The message was delivered, but the Service Worker passed a Promise to | 217 // The message was delivered, but the Service Worker passed a Promise to |
| 218 // event.waitUntil that got rejected. | 218 // event.waitUntil that got rejected. |
| 219 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED = 6, | 219 PUSH_DELIVERY_STATUS_EVENT_WAITUNTIL_REJECTED = 6, |
| 220 | 220 |
| 221 // The message was delivered, but the Service Worker timed out processing it. | 221 // The message was delivered, but the Service Worker timed out processing it. |
| 222 PUSH_DELIVERY_STATUS_TIMEOUT = 7, | 222 PUSH_DELIVERY_STATUS_TIMEOUT = 7, |
| 223 | 223 |
| 224 // The message could not be delivered because the permission granted to the |
| 225 // origin has been suspended, for example through a kill switch. |
| 226 PUSH_DELIVERY_STATUS_PERMISSION_SUSPENDED = 8, |
| 227 |
| 224 // NOTE: Do not renumber these as that would confuse interpretation of | 228 // NOTE: Do not renumber these as that would confuse interpretation of |
| 225 // previously logged data. When making changes, also update the enum list | 229 // previously logged data. When making changes, also update the enum list |
| 226 // in tools/metrics/histograms/histograms.xml to keep it in sync, and | 230 // in tools/metrics/histograms/histograms.xml to keep it in sync, and |
| 227 // update PUSH_DELIVERY_STATUS_LAST below. | 231 // update PUSH_DELIVERY_STATUS_LAST below. |
| 228 | 232 |
| 229 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_TIMEOUT | 233 PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_PERMISSION_SUSPENDED |
| 230 }; | 234 }; |
| 231 | 235 |
| 232 // Push message user visible tracking for reporting in UMA. Enum values can be | 236 // Push message user visible tracking for reporting in UMA. Enum values can be |
| 233 // added, but must never be renumbered or deleted and reused. | 237 // added, but must never be renumbered or deleted and reused. |
| 234 enum PushUserVisibleStatus { | 238 enum PushUserVisibleStatus { |
| 235 // A notification was required and one (or more) were shown. | 239 // A notification was required and one (or more) were shown. |
| 236 PUSH_USER_VISIBLE_STATUS_REQUIRED_AND_SHOWN = 0, | 240 PUSH_USER_VISIBLE_STATUS_REQUIRED_AND_SHOWN = 0, |
| 237 | 241 |
| 238 // A notification was not required, but one (or more) were shown anyway. | 242 // A notification was not required, but one (or more) were shown anyway. |
| 239 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_BUT_SHOWN = 1, | 243 PUSH_USER_VISIBLE_STATUS_NOT_REQUIRED_BUT_SHOWN = 1, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 258 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED | 262 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED |
| 259 }; | 263 }; |
| 260 | 264 |
| 261 const char* PushRegistrationStatusToString(PushRegistrationStatus status); | 265 const char* PushRegistrationStatusToString(PushRegistrationStatus status); |
| 262 | 266 |
| 263 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); | 267 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); |
| 264 | 268 |
| 265 } // namespace content | 269 } // namespace content |
| 266 | 270 |
| 267 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ | 271 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
| OLD | NEW |