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

Unified Diff: components/gcm_driver/gcm_account_mapper.cc

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.h ('k') | components/gcm_driver/gcm_account_mapper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_account_mapper.cc
diff --git a/components/gcm_driver/gcm_account_mapper.cc b/components/gcm_driver/gcm_account_mapper.cc
index 02ba9f1ab596ac074c83546b66bad26bffb986c2..e1b4f9221cb55a65ed659081546676208eadc7af 100644
--- a/components/gcm_driver/gcm_account_mapper.cc
+++ b/components/gcm_driver/gcm_account_mapper.cc
@@ -11,6 +11,7 @@
#include "base/time/clock.h"
#include "base/time/default_clock.h"
#include "components/gcm_driver/gcm_driver_desktop.h"
+#include "components/gcm_driver/gcm_message_status.h"
#include "google_apis/gcm/engine/gcm_store.h"
namespace gcm {
@@ -39,6 +40,8 @@ std::string GenerateMessageID() {
return base::GenerateGUID();
}
+void NullReceiptCallback(GCMMessageStatus status) {}
+
} // namespace
const char kGCMAccountMapperAppId[] = "com.google.android.gms";
@@ -181,7 +184,10 @@ void GCMAccountMapper::OnMessage(const std::string& app_id,
// Ensuring the message does not carry the embedded app ID.
IncomingMessage new_message = message;
new_message.data.erase(new_message.data.find(kGCMSendToGaiaIdAppIdKey));
- dispatch_message_callback_.Run(embedded_app_id, new_message);
+ // TODO(harkness): Update this to use a real callback once callbacks are
+ // plumbed to all GCMAppHandlers.
+ dispatch_message_callback_.Run(embedded_app_id, new_message,
+ base::Bind(&NullReceiptCallback));
}
void GCMAccountMapper::OnMessagesDeleted(const std::string& app_id) {
« no previous file with comments | « components/gcm_driver/gcm_account_mapper.h ('k') | components/gcm_driver/gcm_account_mapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698