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

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

Issue 745123002: Link GCM heartbeat with wake on wifi preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gcm/engine/mcs_client.h ('k') | google_apis/gcm/engine/mcs_client_unittest.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.cc
diff --git a/google_apis/gcm/engine/mcs_client.cc b/google_apis/gcm/engine/mcs_client.cc
index 01512cb36918bd5dc4703a6920b053444fb7ca7c..9b5dc6e940ba5139c58b266bad8a24db191ee849 100644
--- a/google_apis/gcm/engine/mcs_client.cc
+++ b/google_apis/gcm/engine/mcs_client.cc
@@ -159,8 +159,7 @@ MCSClient::MCSClient(const std::string& version_string,
base::Clock* clock,
ConnectionFactory* connection_factory,
GCMStore* gcm_store,
- GCMStatsRecorder* recorder,
- scoped_ptr<base::Timer> heartbeat_timer)
+ GCMStatsRecorder* recorder)
: version_string_(version_string),
clock_(clock),
state_(UNINITIALIZED),
@@ -173,7 +172,6 @@ MCSClient::MCSClient(const std::string& version_string,
stream_id_out_(0),
stream_id_in_(0),
gcm_store_(gcm_store),
- heartbeat_manager_(heartbeat_timer.Pass()),
recorder_(recorder),
weak_ptr_factory_(this) {
}
@@ -368,6 +366,10 @@ void MCSClient::SendMessage(const MCSMessage& message) {
MaybeSendMessage();
}
+void MCSClient::UpdateHeartbeatTimer(scoped_ptr<base::Timer> timer) {
+ heartbeat_manager_.UpdateHeartbeatTimer(timer.Pass());
+}
+
void MCSClient::ResetStateAndBuildLoginRequest(
mcs_proto::LoginRequest* request) {
DCHECK(android_id_);
« no previous file with comments | « google_apis/gcm/engine/mcs_client.h ('k') | google_apis/gcm/engine/mcs_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698