Index: content/public/common/push_messaging_status.h |
diff --git a/content/public/common/push_messaging_status.h b/content/public/common/push_messaging_status.h |
index 9d9fc8f910519ef3dc2fb05a2117cc4c54897b16..72c40e65714d657b6d73ac4bf47b424e324f2ddc 100644 |
--- a/content/public/common/push_messaging_status.h |
+++ b/content/public/common/push_messaging_status.h |
@@ -7,118 +7,118 @@ |
namespace content { |
-// Push registration success/error codes for internal use & reporting in UMA. |
-enum PushRegistrationStatus { |
- // New successful registration (there was not yet a registration cached in |
- // Service Worker storage, so the browser successfully registered with the |
- // push service. This is likely to be a new push registration, though it's |
+// Push subscription success/error codes for internal use & reporting in UMA. |
+enum PushSubscriptionStatus { |
+ // New successful subscriptions (there was not yet a subscription cached in |
+ // Service Worker storage, so the browser successfully subscribed with the |
+ // push service. This is likely to be a new push subscription, though it's |
// possible that the push service had its own cache (for example if Chrome's |
- // app data was cleared, we might have forgotten about a registration that the |
+ // app data was cleared, we might have forgotten about a subscription that the |
// push service still stores). |
- PUSH_REGISTRATION_STATUS_SUCCESS_FROM_PUSH_SERVICE = 0, |
+ PUSH_SUBSCRIPTION_STATUS_SUCCESS_FROM_PUSH_SERVICE = 0, |
- // Registration failed because there is no Service Worker. |
- PUSH_REGISTRATION_STATUS_NO_SERVICE_WORKER = 1, |
+ // Subscription failed because there is no Service Worker. |
+ PUSH_SUBSCRIPTION_STATUS_NO_SERVICE_WORKER = 1, |
- // Registration failed because the push service is not available. |
- PUSH_REGISTRATION_STATUS_SERVICE_NOT_AVAILABLE = 2, |
+ // Subscription failed because the push service is not available. |
+ PUSH_SUBSCRIPTION_STATUS_SERVICE_NOT_AVAILABLE = 2, |
- // Registration failed because the maximum number of registratons has been |
+ // Subscription failed because the maximum number of subscriptions has been |
// reached. |
- PUSH_REGISTRATION_STATUS_LIMIT_REACHED = 3, |
+ PUSH_SUBSCRIPTION_STATUS_LIMIT_REACHED = 3, |
- // Registration failed because permission was denied. |
- PUSH_REGISTRATION_STATUS_PERMISSION_DENIED = 4, |
+ // Subscription failed because permission was denied. |
+ PUSH_SUBSCRIPTION_STATUS_PERMISSION_DENIED = 4, |
- // Registration failed in the push service implemented by the embedder. |
- PUSH_REGISTRATION_STATUS_SERVICE_ERROR = 5, |
+ // Subscription failed in the push service implemented by the embedder. |
+ PUSH_SUBSCRIPTION_STATUS_SERVICE_ERROR = 5, |
- // Registration failed because no sender id was provided by the page. |
- PUSH_REGISTRATION_STATUS_NO_SENDER_ID = 6, |
+ // Subscription failed because no sender id was provided by the page. |
+ PUSH_SUBSCRIPTION_STATUS_NO_SENDER_ID = 6, |
- // Registration succeeded, but we failed to persist it. |
- PUSH_REGISTRATION_STATUS_STORAGE_ERROR = 7, |
+ // Subscription succeeded, but we failed to persist it. |
+ PUSH_SUBSCRIPTION_STATUS_STORAGE_ERROR = 7, |
- // A successful registration was already cached in Service Worker storage. |
- PUSH_REGISTRATION_STATUS_SUCCESS_FROM_CACHE = 8, |
+ // A successful subscription was already cached in Service Worker storage. |
+ PUSH_SUBSCRIPTION_STATUS_SUCCESS_FROM_CACHE = 8, |
- // Registration failed due to a network error. |
- PUSH_REGISTRATION_STATUS_NETWORK_ERROR = 9, |
+ // Subscription failed due to a network error. |
+ PUSH_SUBSCRIPTION_STATUS_NETWORK_ERROR = 9, |
- // Registration failed because the push service is not available in incognito, |
+ // Subscription failed because the push service is not available in incognito, |
// but we tell JS that permission was denied to not reveal incognito. |
- PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED = 10, |
+ PUSH_SUBSCRIPTION_STATUS_INCOGNITO_PERMISSION_DENIED = 10, |
// NOTE: Do not renumber these as that would confuse interpretation of |
// previously logged data. When making changes, also update the enum list |
// in tools/metrics/histograms/histograms.xml to keep it in sync, and |
- // update PUSH_REGISTRATION_STATUS_LAST below. |
+ // update PUSH_SUBSCRIPTION_STATUS_LAST below. |
- PUSH_REGISTRATION_STATUS_LAST = |
- PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED |
+ PUSH_SUBSCRIPTION_STATUS_LAST = |
+ PUSH_SUBSCRIPTION_STATUS_INCOGNITO_PERMISSION_DENIED |
}; |
-// Push unregistration success/error codes for internal use & reporting in UMA. |
-enum PushUnregistrationStatus { |
- // The unregistration was successful. |
- PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED = 0, |
+// Push unsubscription success/error codes for internal use & reporting in UMA. |
+enum PushUnsubscriptionStatus { |
+ // The unsubscription was successful. |
+ PUSH_UNSUBSCRIPTION_STATUS_SUCCESS_UNSUBSCRIBED = 0, |
- // Unregistration was unnecessary, as the registration was not found. |
- PUSH_UNREGISTRATION_STATUS_SUCCESS_WAS_NOT_REGISTERED = 1, |
+ // Unsubscription was unnecessary, as the subscription was not found. |
+ PUSH_UNSUBSCRIPTION_STATUS_SUCCESS_WAS_NOT_SUBSCRIBED = 1, |
- // The unregistration did not happen because of a network error, but will be |
+ // The unsubscription did not happen because of a network error, but will be |
// retried until it succeeds. |
- PUSH_UNREGISTRATION_STATUS_PENDING_NETWORK_ERROR = 2, |
+ PUSH_UNSUBSCRIPTION_STATUS_PENDING_NETWORK_ERROR = 2, |
- // Unregistration failed because there is no Service Worker. |
- PUSH_UNREGISTRATION_STATUS_NO_SERVICE_WORKER = 3, |
+ // Unsubscription failed because there is no Service Worker. |
+ PUSH_UNSUBSCRIPTION_STATUS_NO_SERVICE_WORKER = 3, |
- // Unregistration failed because the push service is not available. |
- PUSH_UNREGISTRATION_STATUS_SERVICE_NOT_AVAILABLE = 4, |
+ // Unsubscription failed because the push service is not available. |
+ PUSH_UNSUBSCRIPTION_STATUS_SERVICE_NOT_AVAILABLE = 4, |
- // Unregistration failed in the push service implemented by the embedder, but |
+ // Unsubscription failed in the push service implemented by the embedder, but |
// will be retried until it succeeds. |
- PUSH_UNREGISTRATION_STATUS_PENDING_SERVICE_ERROR = 5, |
+ PUSH_UNSUBSCRIPTION_STATUS_PENDING_SERVICE_ERROR = 5, |
- // Unregistration succeeded, but we failed to clear Service Worker storage. |
- PUSH_UNREGISTRATION_STATUS_STORAGE_ERROR = 6, |
+ // Unsubscription succeeded, but we failed to clear Service Worker storage. |
+ PUSH_UNSUBSCRIPTION_STATUS_STORAGE_ERROR = 6, |
- // Unregistration failed due to a network error. |
- PUSH_UNREGISTRATION_STATUS_NETWORK_ERROR = 7, |
+ // Unsubscription failed due to a network error. |
+ PUSH_UNSUBSCRIPTION_STATUS_NETWORK_ERROR = 7, |
// NOTE: Do not renumber these as that would confuse interpretation of |
// previously logged data. When making changes, also update the enum list |
// in tools/metrics/histograms/histograms.xml to keep it in sync, and |
- // update PUSH_UNREGISTRATION_STATUS_LAST below. |
+ // update PUSH_UNSUBSCRIPTION_STATUS_LAST below. |
- PUSH_UNREGISTRATION_STATUS_LAST = PUSH_UNREGISTRATION_STATUS_NETWORK_ERROR |
+ PUSH_UNSUBSCRIPTION_STATUS_LAST = PUSH_UNSUBSCRIPTION_STATUS_NETWORK_ERROR |
}; |
-// Push getregistration success/error codes for internal use & reporting in UMA. |
-enum PushGetRegistrationStatus { |
- // Getting the registration was successful. |
- PUSH_GETREGISTRATION_STATUS_SUCCESS = 0, |
+// Push getsubscription success/error codes for internal use & reporting in UMA. |
+enum PushGetSubscriptionStatus { |
+ // Getting the subscription was successful. |
+ PUSH_GETSUBSCRIPTION_STATUS_SUCCESS = 0, |
- // Getting the registration failed because the push service is not available. |
- PUSH_GETREGISTRATION_STATUS_SERVICE_NOT_AVAILABLE = 1, |
+ // Getting the subscription failed because the push service is not available. |
+ PUSH_GETSUBSCRIPTION_STATUS_SERVICE_NOT_AVAILABLE = 1, |
- // Getting the registration failed because we failed to read from storage. |
- PUSH_GETREGISTRATION_STATUS_STORAGE_ERROR = 2, |
+ // Getting the subscription failed because we failed to read from storage. |
+ PUSH_GETSUBSCRIPTION_STATUS_STORAGE_ERROR = 2, |
- // Getting the registration failed because there is no push registration. |
- PUSH_GETREGISTRATION_STATUS_REGISTRATION_NOT_FOUND = 3, |
+ // Getting the subscription failed because there is no push subscription. |
+ PUSH_GETSUBSCRIPTION_STATUS_SUBSCRIPTION_NOT_FOUND = 3, |
- // Getting the registration failed because the push service isn't available in |
- // incognito, but we tell JS registration not found to not reveal incognito. |
- PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND = 4, |
+ // Getting the subscription failed because the push service isn't available in |
+ // incognito, but we tell JS subscription not found to not reveal incognito. |
+ PUSH_GETSUBSCRIPTION_STATUS_INCOGNITO_SUBSCRIPTION_NOT_FOUND = 4, |
// NOTE: Do not renumber these as that would confuse interpretation of |
// previously logged data. When making changes, also update the enum list |
// in tools/metrics/histograms/histograms.xml to keep it in sync, and |
- // update PUSH_GETREGISTRATION_STATUS_LAST below. |
+ // update PUSH_GETSUBSCRIPTION_STATUS_LAST below. |
- PUSH_GETREGISTRATION_STATUS_LAST = |
- PUSH_GETREGISTRATION_STATUS_INCOGNITO_REGISTRATION_NOT_FOUND |
+ PUSH_GETSUBSCRIPTION_STATUS_LAST = |
+ PUSH_GETSUBSCRIPTION_STATUS_INCOGNITO_SUBSCRIPTION_NOT_FOUND |
}; |
// Push message event success/error codes for internal use & reporting in UMA. |
@@ -181,9 +181,9 @@ enum PushUserVisibleStatus { |
PUSH_USER_VISIBLE_STATUS_REQUIRED_BUT_NOT_SHOWN_GRACE_EXCEEDED |
}; |
-const char* PushRegistrationStatusToString(PushRegistrationStatus status); |
+const char* PushSubscriptionStatusToString(PushSubscriptionStatus status); |
-const char* PushUnregistrationStatusToString(PushUnregistrationStatus status); |
+const char* PushUnsubscriptionStatusToString(PushUnsubscriptionStatus status); |
} // namespace content |