Index: components/gcm_driver/gcm_driver.h |
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h |
index f115d16562a00f5259063fee96ca738bf8819c74..88ae9281008e827e23af43b2812a5299f7a65016 100644 |
--- a/components/gcm_driver/gcm_driver.h |
+++ b/components/gcm_driver/gcm_driver.h |
@@ -18,6 +18,7 @@ |
#include "components/gcm_driver/crypto/gcm_encryption_provider.h" |
#include "components/gcm_driver/default_gcm_app_handler.h" |
#include "components/gcm_driver/gcm_client.h" |
+#include "components/gcm_driver/gcm_message_status.h" |
namespace base { |
class FilePath; |
@@ -199,7 +200,7 @@ class GCMDriver { |
// Updates the |account_mapping| information in persistent store. |
virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0; |
- // Removes the account mapping information reated to |account_id| from |
+ // Removes the account mapping information related to |account_id| from |
// persistent store. |
virtual void RemoveAccountMapping(const std::string& account_id) = 0; |
@@ -292,7 +293,8 @@ class GCMDriver { |
// dispatched when the decryption operation was successful. Otherwise, the |
// |message| will be dispatched immediately to the handler for |app_id|. |
void DispatchMessage(const std::string& app_id, |
- const IncomingMessage& message); |
+ const IncomingMessage& message, |
+ const MessageReceiptCallback& callback); |
private: |
// Common code shared by Unregister and UnregisterWithSenderId. |
@@ -304,6 +306,7 @@ class GCMDriver { |
// if |result| indicates that it is safe to do so, or will report a decryption |
// failure for the |app_id| otherwise. |
void DispatchMessageInternal(const std::string& app_id, |
+ const MessageReceiptCallback& callback, |
GCMEncryptionProvider::DecryptionResult result, |
const IncomingMessage& message); |
@@ -315,6 +318,12 @@ class GCMDriver { |
const UnregisterCallback& unregister_callback, |
GCMClient::Result result); |
+ // Send a message to GCM with information about the final status of a |
+ // previously received message. This can be run as a result of a callback |
+ // being executed from an AppHandler. |
+ virtual void DoSendMessageReceipt(const MessageReceiptCallback& callback, |
+ GCMMessageStatus status) = 0; |
Peter Beverloo
2017/02/08 17:09:09
Instead of defining this in the base class (GCMDri
harkness
2017/02/09 16:27:30
Done.
|
+ |
// Callback map (from app_id to callback) for Register. |
std::map<std::string, RegisterCallback> register_callbacks_; |