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

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

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: Fix build error in mcs_probe 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
« no previous file with comments | « google_apis/gcm/engine/heartbeat_manager.cc ('k') | google_apis/gcm/engine/mcs_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/engine/heartbeat_manager_unittest.cc
diff --git a/google_apis/gcm/engine/heartbeat_manager_unittest.cc b/google_apis/gcm/engine/heartbeat_manager_unittest.cc
index 2c3b668d5335c3819a30d1c22a0de8b7484e29c2..a2755df452cf97cf7e40ff683eb1a15db07b9894 100644
--- a/google_apis/gcm/engine/heartbeat_manager_unittest.cc
+++ b/google_apis/gcm/engine/heartbeat_manager_unittest.cc
@@ -4,8 +4,11 @@
#include "google_apis/gcm/engine/heartbeat_manager.h"
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
+#include "base/timer/timer.h"
#include "google_apis/gcm/protocol/mcs.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,7 +24,10 @@ mcs_proto::HeartbeatConfig BuildHeartbeatConfig(int interval_ms) {
class TestHeartbeatManager : public HeartbeatManager {
public:
- TestHeartbeatManager() {}
+ TestHeartbeatManager()
+ : HeartbeatManager(make_scoped_ptr(
+ new base::Timer(true, /* retain user task */
+ false /* non repeating */))) {}
virtual ~TestHeartbeatManager() {}
// Bypass the heartbeat timer, and send the heartbeat now.
« no previous file with comments | « google_apis/gcm/engine/heartbeat_manager.cc ('k') | google_apis/gcm/engine/mcs_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698