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

Unified Diff: components/gcm_driver/gcm_client_impl.cc

Issue 442123003: [GCM] Adding the OnSendAcknowledgement event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing code review comments. Created 6 years, 4 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.h ('k') | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_client_impl.cc
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
index 1af8dc5023b8e73264ccee853c79d53fa4f31006..b5240f95ea4ca1c85f89b218d350948a7c22a0b0 100644
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -857,15 +857,15 @@ void GCMClientImpl::OnMessageSentToMCS(int64 user_serial_number,
// All other errors will be raised immediately, through asynchronous callback.
// It is expected that TTL_EXCEEDED will be issued for a message that was
// previously issued |OnSendFinished| with status SUCCESS.
- // For now, we do not report that the message has been sent and acked
- // successfully.
// TODO(jianli): Consider adding UMA for this status.
if (status == MCSClient::TTL_EXCEEDED) {
SendErrorDetails send_error_details;
send_error_details.message_id = message_id;
send_error_details.result = GCMClient::TTL_EXCEEDED;
delegate_->OnMessageSendError(app_id, send_error_details);
- } else if (status != MCSClient::SENT) {
+ } else if (status == MCSClient::SENT) {
+ delegate_->OnSendAcknowledged(app_id, message_id);
+ } else {
delegate_->OnSendFinished(app_id, message_id, ToGCMClientResult(status));
}
}
« no previous file with comments | « components/gcm_driver/gcm_client.h ('k') | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698