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

Side by Side Diff: components/sync/engine_impl/sync_scheduler_impl_unittest.cc

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « components/sync/engine_impl/sync_scheduler_impl.h ('k') | components/sync/engine_impl/syncer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(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 typedef std::vector<TimeTicks> SyncShareTimes; 62 using SyncShareTimes = std::vector<TimeTicks>;
63 63
64 void QuitLoopNow() { 64 void QuitLoopNow() {
65 // We use QuitNow() instead of Quit() as the latter may get stalled 65 // We use QuitNow() instead of Quit() as the latter may get stalled
66 // indefinitely in the presence of repeated timers with low delays 66 // indefinitely in the presence of repeated timers with low delays
67 // and a slow test (e.g., ThrottlingDoesThrottle [which has a poll 67 // and a slow test (e.g., ThrottlingDoesThrottle [which has a poll
68 // delay of 5ms] run under TSAN on the trybots). 68 // delay of 5ms] run under TSAN on the trybots).
69 base::MessageLoop::current()->QuitNow(); 69 base::MessageLoop::current()->QuitNow();
70 } 70 }
71 71
72 void RunLoop() { 72 void RunLoop() {
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/sync/engine_impl/sync_scheduler_impl.h ('k') | components/sync/engine_impl/syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698