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

Unified Diff: components/gcm_driver/gcm_driver_android.cc

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Adding new file I missed previously. Created 3 years, 11 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_driver_android.cc
diff --git a/components/gcm_driver/gcm_driver_android.cc b/components/gcm_driver/gcm_driver_android.cc
index a512e8248d9a045c091c9c2440ec80577d1b26d8..47b926fe7b0088159148ed4ca0c78dfd122f95fc 100644
--- a/components/gcm_driver/gcm_driver_android.cc
+++ b/components/gcm_driver/gcm_driver_android.cc
@@ -109,7 +109,16 @@ void GCMDriverAndroid::OnMessageReceived(
recorder_.RecordDataMessageReceived(app_id, message.sender_id,
message_byte_size);
- DispatchMessage(app_id, message);
+ DispatchMessage(app_id, message,
+ base::Bind(&GCMDriverAndroid::SendMessageReceipt,
Peter Beverloo 2017/01/13 01:46:12 Why isn't this BindToCurrentThread? If we're telli
harkness 2017/01/19 13:20:42 Done.
+ weak_ptr_factory_.GetWeakPtr(), app_id, ""));
Peter Beverloo 2017/01/13 01:46:12 Why the empty string for |message_id|? Can we just
harkness 2017/01/19 13:20:42 Sure, that's a good idea. Done.
+}
+
+void GCMDriverAndroid::SendMessageReceipt(const std::string& app_id,
+ const std::string& message_id,
+ GCMMessageStatus status) {
+ // TODO(harkness) Implement message receipts in android.
Peter Beverloo 2017/01/13 01:46:12 nit: please mention a bug
harkness 2017/01/19 13:20:42 Done.
+ NOTIMPLEMENTED();
}
// static

Powered by Google App Engine
This is Rietveld 408576698