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 9e9694f87e3d7379a0b22875c64550a68ee946be..48a10b52b3a27958abe5032a57781e0040abc4d3 100644 |
--- a/content/public/common/push_messaging_status.h |
+++ b/content/public/common/push_messaging_status.h |
@@ -2,46 +2,51 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
-#define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
+#ifndef CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
+#define CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |
namespace content { |
-enum PushMessagingStatus { |
- // Everything is ok. |
- PUSH_MESSAGING_STATUS_OK, |
+enum PushRegistrationStatus { |
+ // Registration was successful. |
+ PUSH_REGISTRATION_STATUS_SUCCESS, |
// Registration failed because there is no Service Worker. |
- PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_NO_SERVICE_WORKER, |
+ PUSH_REGISTRATION_STATUS_NO_SERVICE_WORKER, |
// Registration failed because the push service is not available. |
- PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_NOT_AVAILABLE, |
+ PUSH_REGISTRATION_STATUS_SERVICE_NOT_AVAILABLE, |
// Registration failed because the maximum number of registratons has been |
// reached. |
- PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_LIMIT_REACHED, |
+ PUSH_REGISTRATION_STATUS_LIMIT_REACHED, |
// Registration failed because permission was denied. |
- PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_PERMISSION_DENIED, |
+ PUSH_REGISTRATION_STATUS_PERMISSION_DENIED, |
// Registration failed in the push service implemented by the embedder. |
- PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_ERROR, |
+ PUSH_REGISTRATION_STATUS_SERVICE_ERROR, |
+ |
+ // Used for IPC message range checks. |
+ PUSH_REGISTRATION_STATUS_LAST = PUSH_REGISTRATION_STATUS_SERVICE_ERROR |
+}; |
+ |
+enum PushDeliveryStatus { |
+ // The message was successfully delivered. |
+ PUSH_DELIVERY_STATUS_SUCCESS, |
// The message could not be delivered because no service worker was found. |
- PUSH_MESSAGING_STATUS_MESSAGE_DELIVERY_FAILED_NO_SERVICE_WORKER, |
+ PUSH_DELIVERY_STATUS_NO_SERVICE_WORKER, |
// The message could not be delivered because of a service worker error. |
- PUSH_MESSAGING_STATUS_MESSAGE_DELIVERY_FAILED_SERVICE_WORKER_ERROR, |
- |
- // Generic error (a more specific error should be used whenever possible). |
- PUSH_MESSAGING_STATUS_ERROR, |
+ PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR, |
// Used for IPC message range checks. |
- PUSH_MESSAGING_STATUS_LAST = PUSH_MESSAGING_STATUS_ERROR |
+ PUSH_DELIVERY_STATUS_LAST = PUSH_DELIVERY_STATUS_SERVICE_WORKER_ERROR |
}; |
-const char* PushMessagingStatusToString(PushMessagingStatus status); |
+const char* PushRegistrationStatusToString(PushRegistrationStatus status); |
} // namespace content |
-#endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_STATUS_H_ |
+#endif // CONTENT_PUBLIC_COMMON_PUSH_MESSAGING_STATUS_H_ |