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

Side by Side Diff: google_apis/gcm/engine/mcs_client.h

Issue 745123002: Link GCM heartbeat with wake on wifi preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up includes Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_
6 #define GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // Returns the size of the send message queue. 142 // Returns the size of the send message queue.
143 int GetSendQueueSize() const; 143 int GetSendQueueSize() const;
144 144
145 // Returns the size of the resend messaage queue. 145 // Returns the size of the resend messaage queue.
146 int GetResendQueueSize() const; 146 int GetResendQueueSize() const;
147 147
148 // Returns text representation of the state enum. 148 // Returns text representation of the state enum.
149 std::string GetStateString() const; 149 std::string GetStateString() const;
150 150
151 // Updates the timer used by |heartbeat_manager_| for sending heartbeats.
152 void UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer);
153
151 private: 154 private:
152 typedef uint32 StreamId; 155 typedef uint32 StreamId;
153 typedef std::string PersistentId; 156 typedef std::string PersistentId;
154 typedef std::vector<StreamId> StreamIdList; 157 typedef std::vector<StreamId> StreamIdList;
155 typedef std::vector<PersistentId> PersistentIdList; 158 typedef std::vector<PersistentId> PersistentIdList;
156 typedef std::map<StreamId, PersistentId> StreamIdToPersistentIdMap; 159 typedef std::map<StreamId, PersistentId> StreamIdToPersistentIdMap;
157 typedef linked_ptr<ReliablePacketInfo> MCSPacketInternal; 160 typedef linked_ptr<ReliablePacketInfo> MCSPacketInternal;
158 161
159 // Resets the internal state and builds a new login request, acknowledging 162 // Resets the internal state and builds a new login request, acknowledging
160 // any pending server-to-device messages and rebuilding the send queue 163 // any pending server-to-device messages and rebuilding the send queue
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 GCMStatsRecorder* recorder_; 284 GCMStatsRecorder* recorder_;
282 285
283 base::WeakPtrFactory<MCSClient> weak_ptr_factory_; 286 base::WeakPtrFactory<MCSClient> weak_ptr_factory_;
284 287
285 DISALLOW_COPY_AND_ASSIGN(MCSClient); 288 DISALLOW_COPY_AND_ASSIGN(MCSClient);
286 }; 289 };
287 290
288 } // namespace gcm 291 } // namespace gcm
289 292
290 #endif // GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_ 293 #endif // GOOGLE_APIS_GCM_ENGINE_MCS_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698