| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "google_apis/gcm/engine/heartbeat_manager.h" | 5 #include "google_apis/gcm/engine/heartbeat_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" |
| 7 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 8 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 9 #include "google_apis/gcm/protocol/mcs.pb.h" | 11 #include "google_apis/gcm/protocol/mcs.pb.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 13 |
| 12 namespace gcm { | 14 namespace gcm { |
| 13 | 15 |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 mcs_proto::HeartbeatConfig BuildHeartbeatConfig(int interval_ms) { | 18 mcs_proto::HeartbeatConfig BuildHeartbeatConfig(int interval_ms) { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 StartManager(); | 169 StartManager(); |
| 168 EXPECT_GT(manager()->GetNextHeartbeatTime(), base::TimeTicks::Now()); | 170 EXPECT_GT(manager()->GetNextHeartbeatTime(), base::TimeTicks::Now()); |
| 169 | 171 |
| 170 manager()->Stop(); | 172 manager()->Stop(); |
| 171 EXPECT_TRUE(manager()->GetNextHeartbeatTime().is_null()); | 173 EXPECT_TRUE(manager()->GetNextHeartbeatTime().is_null()); |
| 172 } | 174 } |
| 173 | 175 |
| 174 } // namespace | 176 } // namespace |
| 175 | 177 |
| 176 } // namespace gcm | 178 } // namespace gcm |
| OLD | NEW |