| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/sync/engine_impl/sync_scheduler_impl.h" | 5 #include "components/sync/engine_impl/sync_scheduler_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 namespace syncer { | 45 namespace syncer { |
| 46 | 46 |
| 47 using sync_pb::GetUpdatesCallerInfo; | 47 using sync_pb::GetUpdatesCallerInfo; |
| 48 | 48 |
| 49 class MockSyncer : public Syncer { | 49 class MockSyncer : public Syncer { |
| 50 public: | 50 public: |
| 51 MockSyncer(); | 51 MockSyncer(); |
| 52 MOCK_METHOD3(NormalSyncShare, bool(ModelTypeSet, NudgeTracker*, SyncCycle*)); | 52 MOCK_METHOD3(NormalSyncShare, bool(ModelTypeSet, NudgeTracker*, SyncCycle*)); |
| 53 MOCK_METHOD3(ConfigureSyncShare, | 53 MOCK_METHOD3(ConfigureSyncShare, |
| 54 bool(ModelTypeSet, | 54 bool(const ModelTypeSet&, |
| 55 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, | 55 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource, |
| 56 SyncCycle*)); | 56 SyncCycle*)); |
| 57 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, SyncCycle*)); | 57 MOCK_METHOD2(PollSyncShare, bool(ModelTypeSet, SyncCycle*)); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 MockSyncer::MockSyncer() : Syncer(nullptr) {} | 60 MockSyncer::MockSyncer() : Syncer(nullptr) {} |
| 61 | 61 |
| 62 using SyncShareTimes = std::vector<TimeTicks>; | 62 using SyncShareTimes = std::vector<TimeTicks>; |
| 63 | 63 |
| 64 void QuitLoopNow() { | 64 void QuitLoopNow() { |
| (...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 | 1754 |
| 1755 // The Exponential backoff should be between previous backoff 1.5 and 2.5 | 1755 // The Exponential backoff should be between previous backoff 1.5 and 2.5 |
| 1756 // times. | 1756 // times. |
| 1757 EXPECT_LE(first_blocking_time * 1.5, second_blocking_time); | 1757 EXPECT_LE(first_blocking_time * 1.5, second_blocking_time); |
| 1758 EXPECT_GE(first_blocking_time * 2.5, second_blocking_time); | 1758 EXPECT_GE(first_blocking_time * 2.5, second_blocking_time); |
| 1759 | 1759 |
| 1760 StopSyncScheduler(); | 1760 StopSyncScheduler(); |
| 1761 } | 1761 } |
| 1762 | 1762 |
| 1763 } // namespace syncer | 1763 } // namespace syncer |
| OLD | NEW |