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

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

Issue 148293002: [GCM] Add basic collapse key support for upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 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 | « google_apis/gcm/engine/gcm_store_impl.cc ('k') | google_apis/gcm/engine/mcs_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/mcs_client.h
diff --git a/google_apis/gcm/engine/mcs_client.h b/google_apis/gcm/engine/mcs_client.h
index 036acb8b159f2079b2f3818e3cef2296ebae274e..52eaa0cf46d4125734a78cb200bbf1c3d4fb2c38 100644
--- a/google_apis/gcm/engine/mcs_client.h
+++ b/google_apis/gcm/engine/mcs_client.h
@@ -35,6 +35,7 @@ class LoginRequest;
namespace gcm {
+class CollapseKey;
class ConnectionFactory;
struct ReliablePacketInfo;
@@ -190,6 +191,10 @@ class GCM_EXPORT MCSClient {
void NotifyMessageSendStatus(const google::protobuf::MessageLite& protobuf,
MessageSendStatus status);
+ // Pops the next message from the front of the send queue (cleaning up
+ // any associated state).
+ MCSPacketInternal PopMessageForSend();
+
// Clock for enforcing TTL. Passed in for testing.
base::Clock* const clock_;
@@ -220,6 +225,9 @@ class GCM_EXPORT MCSClient {
std::deque<MCSPacketInternal> to_send_;
std::deque<MCSPacketInternal> to_resend_;
+ // Map of collapse keys to their pending messages.
+ std::map<CollapseKey, ReliablePacketInfo*> collapse_key_map_;
+
// Last device_to_server stream id acknowledged by the server.
StreamId last_device_to_server_stream_id_received_;
// Last server_to_device stream id acknowledged by this device.
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl.cc ('k') | google_apis/gcm/engine/mcs_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698