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

Unified Diff: components/gcm_driver/gcm_driver.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_client_impl_unittest.cc ('k') | components/gcm_driver/gcm_driver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..074cea1a10568dc2b9ee2178f10e706f3602d21a 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;
@@ -290,9 +291,11 @@ class GCMDriver {
// Dispatches the OnMessage event to the app handler associated with |app_id|.
// If |message| has been encrypted, it will be decrypted asynchronously and
// dispatched when the decryption operation was successful. Otherwise, the
- // |message| will be dispatched immediately to the handler for |app_id|.
+ // |message| will be dispatched immediately to the handler for |app_id|. The
+ // |optional_receipt_callback| must be invoked on the UI thread.
void DispatchMessage(const std::string& app_id,
- const IncomingMessage& message);
+ const IncomingMessage& message,
+ const MessageReceiptCallback& optional_receipt_callback);
private:
// Common code shared by Unregister and UnregisterWithSenderId.
@@ -303,9 +306,11 @@ class GCMDriver {
// Dispatches the OnMessage event to the app handler associated with |app_id|
// 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,
- GCMEncryptionProvider::DecryptionResult result,
- const IncomingMessage& message);
+ void DispatchMessageInternal(
+ const std::string& app_id,
+ const MessageReceiptCallback& optional_receipt_callback,
+ GCMEncryptionProvider::DecryptionResult result,
+ const IncomingMessage& message);
// Called after unregistration completes in order to trigger the pending
// registration.
« no previous file with comments | « components/gcm_driver/gcm_client_impl_unittest.cc ('k') | components/gcm_driver/gcm_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698