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

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

Issue 641943002: components: Introduce AlarmTimer class and use it for GCM heartbeat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the code over to components/ Created 6 years, 2 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/heartbeat_manager.h
diff --git a/google_apis/gcm/engine/heartbeat_manager.h b/google_apis/gcm/engine/heartbeat_manager.h
index 9266b98c8d4b21f02935002cd106dd314c27e40a..48cc6a49fe4fb0566cca1dea396c2b7b39b3336e 100644
--- a/google_apis/gcm/engine/heartbeat_manager.h
+++ b/google_apis/gcm/engine/heartbeat_manager.h
@@ -7,10 +7,14 @@
#include "base/callback.h"
#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "base/timer/timer.h"
#include "google_apis/gcm/base/gcm_export.h"
+namespace base {
+class Timer;
+}
+
namespace mcs_proto {
class HeartbeatConfig;
}
@@ -65,8 +69,8 @@ class GCM_EXPORT HeartbeatManager {
// provided).
int server_interval_ms_;
- // Timer for triggering heartbeats.
- base::Timer heartbeat_timer_;
+ // Timer for triggering heartbeats. Owned by HeartbeatManager.
Nicolas Zea 2014/10/21 17:57:54 nit: Since you're using a scoped_ptr now, ownershi
Chirantan Ekbote 2014/10/21 21:13:48 Done.
+ scoped_ptr<base::Timer> heartbeat_timer_;
// Callbacks for interacting with the the connection.
base::Closure send_heartbeat_callback_;

Powered by Google App Engine
This is Rietveld 408576698