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

Unified Diff: google_apis/gcm/engine/mcs_client.cc

Issue 383993006: [GCM] Add a SelectiveAck test for midstream acks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 5 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: google_apis/gcm/engine/mcs_client.cc
diff --git a/google_apis/gcm/engine/mcs_client.cc b/google_apis/gcm/engine/mcs_client.cc
index a99a333a37e0d694c0a5233ef76012c9d89947d1..fbabda16f12ca9306e7ae3c71c85485667936980 100644
--- a/google_apis/gcm/engine/mcs_client.cc
+++ b/google_apis/gcm/engine/mcs_client.cc
@@ -770,7 +770,7 @@ void MCSClient::HandleStreamAck(StreamId last_stream_id_received) {
void MCSClient::HandleSelectiveAck(const PersistentIdList& id_list) {
std::set<PersistentId> remaining_ids(id_list.begin(), id_list.end());
- StreamId last_stream_id_received = -1;
+ StreamId last_stream_id_received = 0;
// First check the to_resend_ queue. Acknowledgments are always contiguous,
// so if there's a pending message that hasn't been acked, all newer messages
@@ -839,6 +839,10 @@ void MCSClient::HandleSelectiveAck(const PersistentIdList& id_list) {
to_send_.push_front(to_resend_.back());
to_resend_.pop_back();
}
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&MCSClient::MaybeSendMessage,
+ weak_ptr_factory_.GetWeakPtr()));
}
void MCSClient::HandleServerConfirmedReceipt(StreamId device_stream_id) {
« no previous file with comments | « no previous file | google_apis/gcm/engine/mcs_client_unittest.cc » ('j') | google_apis/gcm/engine/mcs_client_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698