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

Unified Diff: components/gcm_driver/gcm_client.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_account_mapper_unittest.cc ('k') | components/gcm_driver/gcm_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_client.h
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h
index 95a56d9d0e0f667fc24228fcfaaf535447794f88..59b51ff68cf586b6c624f76b6dccc0e0e4e573fc 100644
--- a/components/gcm_driver/gcm_client.h
+++ b/components/gcm_driver/gcm_client.h
@@ -16,6 +16,7 @@
#include "components/gcm_driver/common/gcm_messages.h"
#include "components/gcm_driver/crypto/gcm_encryption_provider.h"
#include "components/gcm_driver/gcm_activity.h"
+#include "components/gcm_driver/gcm_message_status.h"
#include "components/gcm_driver/registration_info.h"
template <class T> class scoped_refptr;
@@ -177,8 +178,13 @@ class GCMClient {
// Called when a message has been received.
// |app_id|: application ID.
// |message|: message received.
- virtual void OnMessageReceived(const std::string& app_id,
- const IncomingMessage& message) = 0;
+ // |optional_optional_receipt_callback|: Optional callback to invoke if
+ // desired when processing the message is complete if the receiver wants to
+ // return a delivery receipt. The callback must be invoked on the IO thread.
+ virtual void OnMessageReceived(
+ const std::string& app_id,
+ const IncomingMessage& message,
+ const MessageReceiptCallback& optional_receipt_callback) = 0;
// Called when some messages have been deleted from the server.
// |app_id|: application ID.
« no previous file with comments | « components/gcm_driver/gcm_account_mapper_unittest.cc ('k') | components/gcm_driver/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698