Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Unified Diff: components/gcm_driver/gcm_message_status.h

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Fix issue with rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_message_status.h
diff --git a/components/gcm_driver/gcm_message_status.h b/components/gcm_driver/gcm_message_status.h
new file mode 100644
index 0000000000000000000000000000000000000000..eaf9ed0d7b21aa948550b65252a59434fa44e1ee
--- /dev/null
+++ b/components/gcm_driver/gcm_message_status.h
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_
+#define COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_
+
+#include "base/callback.h"
+
+namespace gcm {
+
+// Enumeration to be used for describing the status of a GCM message.
+enum class GCMMessageStatus {
+ // 0 reserved for unresolved.
+ GCM_UNRESOLVED = 0,
+ // 1 reserved for success.
+ GCM_SUCCESS = 1,
+
+ // 2 - 99 reserved for the GCM communication error types.
+ GCM_INVALID_SUBTYPE = 2,
+ GCM_INVALID_SENDER_ID = 3,
+ GCM_NO_REGISTRATION = 4,
+ GCM_DECRYPTION_FAILURE = 5,
+ GCM_UNKNOWN_MESSAGE_TYPE = 6,
+ GCM_INVALID_APP_HANDLER = 7,
+};
+
+using MessageReceiptCallback = base::Callback<void(GCMMessageStatus)>;
+
+} // namespace gcm
+
+#endif // COMPONENTS_GCM_DRIVER_GCM_MESSAGE_STATUS_H_
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698