| Index: content/public/common/push_messaging_status.cc
|
| diff --git a/content/public/common/push_messaging_status.cc b/content/public/common/push_messaging_status.cc
|
| index 754587afe164e5a0ef3b610f8cdbcfd582821438..7cf33b04cf209eed7d698683387d301625330e45 100644
|
| --- a/content/public/common/push_messaging_status.cc
|
| +++ b/content/public/common/push_messaging_status.cc
|
| @@ -36,6 +36,45 @@ const char* PushRegistrationStatusToString(PushRegistrationStatus status) {
|
|
|
| case PUSH_REGISTRATION_STATUS_SUCCESS_FROM_CACHE:
|
| return "Registration successful - from cache";
|
| +
|
| + case PUSH_REGISTRATION_STATUS_NETWORK_ERROR:
|
| + return "Registration failed - could not connect to push server";
|
| +
|
| + case PUSH_REGISTRATION_STATUS_INCOGNITO_PERMISSION_DENIED:
|
| + // We split this out for UMA, but it must be indistinguishable to JS.
|
| + return PushRegistrationStatusToString(
|
| + PUSH_REGISTRATION_STATUS_PERMISSION_DENIED);
|
| + }
|
| + NOTREACHED();
|
| + return "";
|
| +}
|
| +
|
| +const char* PushUnregistrationStatusToString(PushUnregistrationStatus status) {
|
| + switch (status) {
|
| + case PUSH_UNREGISTRATION_STATUS_SUCCESS_UNREGISTERED:
|
| + return "Unregistration successful - from push service";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_SUCCESS_WAS_NOT_REGISTERED:
|
| + return "Unregistration successful - was not registered";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_PENDING_WILL_RETRY_NETWORK_ERROR:
|
| + return "Unregistration pending - a network error occurred, but it will"
|
| + "be retried until it succeeds";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_NO_SERVICE_WORKER:
|
| + return "Unregistration failed - no Service Worker";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_SERVICE_NOT_AVAILABLE:
|
| + return "Unregistration failed - push service not available";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_SERVICE_ERROR:
|
| + return "Unregistration failed - push service error";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_STORAGE_ERROR:
|
| + return "Unregistration failed - storage error";
|
| +
|
| + case PUSH_UNREGISTRATION_STATUS_NETWORK_ERROR:
|
| + return "Unregistration failed - could not connect to push server";
|
| }
|
| NOTREACHED();
|
| return "";
|
|
|