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

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: Added a callback entry point to GCMDriver, moved MessageReceiptCallback to gcm_message_status. 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
Index: components/gcm_driver/gcm_client.h
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h
index c4dd12adc914375e3c8cf118e114589f292a7df5..4badf0f51b9192a00096aeda23af55a5c9ec1ab4 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;
@@ -173,8 +174,14 @@ 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_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 can be invoked from any thread, but will
+ // run on the UI thread.
Peter Beverloo 2017/02/08 17:09:09 [The callback can...the UI thread] That seems wro
harkness 2017/02/09 16:27:29 Yup, I updated the code without updating the comme
+ 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.

Powered by Google App Engine
This is Rietveld 408576698