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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 | 58 |
59 // NOTE: Do not renumber these as that would confuse interpretation of | 59 // NOTE: Do not renumber these as that would confuse interpretation of |
60 // previously logged data. When making changes, also update the enum list | 60 // previously logged data. When making changes, also update the enum list |
61 // in tools/metrics/histograms/histograms.xml to keep it in sync, and | 61 // in tools/metrics/histograms/histograms.xml to keep it in sync, and |
62 // update PUSH_REGISTRATION_STATUS_LAST below. | 62 // update PUSH_REGISTRATION_STATUS_LAST below. |
63 | 63 |
64 PUSH_REGISTRATION_STATUS_LAST = | 64 PUSH_REGISTRATION_STATUS_LAST = |
65 PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING | 65 PUSH_REGISTRATION_STATUS_MANIFEST_EMPTY_OR_MISSING |
66 }; | 66 }; |
67 | 67 |
68 // Push unregistration reason for reporting in UMA. | |
Mark P
2016/09/30 22:39:03
Please add standard warning label here (yes, I see
johnme
2016/09/30 23:10:41
Done (added "Enum values can be added, but must ne
| |
69 enum PushUnregistrationReason { | |
70 // Should never happen. | |
71 PUSH_UNREGISTRATION_REASON_UNKNOWN = 0, | |
72 | |
73 // Unregistering because the website called the unsubscribe API. | |
74 PUSH_UNREGISTRATION_REASON_JAVASCRIPT_API = 1, | |
75 | |
76 // Unregistering because the user manually revoked permission. | |
77 PUSH_UNREGISTRATION_REASON_PERMISSION_REVOKED = 2, | |
78 | |
79 // Automatic - incoming message's app id was unknown. | |
80 PUSH_UNREGISTRATION_REASON_DELIVERY_UNKNOWN_APP_ID = 3, | |
81 | |
82 // Automatic - incoming message's origin no longer has permission. | |
83 PUSH_UNREGISTRATION_REASON_DELIVERY_PERMISSION_DENIED = 4, | |
84 | |
85 // Automatic - incoming message's service worker was not found. | |
86 PUSH_UNREGISTRATION_REASON_DELIVERY_NO_SERVICE_WORKER = 5, | |
87 | |
88 // NOTE: Do not renumber these as that would confuse interpretation of | |
89 // previously logged data. When making changes, also update the enum list | |
90 // in tools/metrics/histograms/histograms.xml to keep it in sync, and | |
91 // update PUSH_UNREGISTRATION_REASON_LAST below. | |
92 | |
93 PUSH_UNREGISTRATION_REASON_LAST = | |
94 PUSH_UNREGISTRATION_REASON_DELIVERY_NO_SERVICE_WORKER | |
95 }; | |
96 | |
68 // Push unregistration success/error codes for internal use & reporting in UMA. | 97 // Push unregistration success/error codes for internal use & reporting in UMA. |
69 enum PushUnregistrationStatus { | 98 enum PushUnregistrationStatus { |
70 // The unregistration was successful. | 99 // The unregistration was successful. |
71 PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED = 0, | 100 PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED = 0, |
72 | 101 |
73 // Unregistration was unnecessary, as the registration was not found. | 102 // Unregistration was unnecessary, as the registration was not found. |
74 PUSH_UNREGISTRATION_STATUS_SUCCESS_WAS_NOT_REGISTERED = 1, | 103 PUSH_UNREGISTRATION_STATUS_SUCCESS_WAS_NOT_REGISTERED = 1, |
75 | 104 |
76 // The unregistration did not happen because of a network error, but will be | 105 // The unregistration did not happen because of a network error, but will be |
77 // retried until it succeeds. | 106 // retried until it succeeds. |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED | 217 PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED |
189 }; | 218 }; |
190 | 219 |
191 const char* PushRegistrationStatusToString(PushRegistrationStatus status); | 220 const char* PushRegistrationStatusToString(PushRegistrationStatus status); |
192 | 221 |
193 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); | 222 const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); |
194 | 223 |
195 } // namespace content | 224 } // namespace content |
196 | 225 |
197 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ | 226 #endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
OLD | NEW |