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

Side by Side Diff: sync/engine/sync_scheduler_unittest.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « sync/engine/sync_scheduler_impl.h ('k') | sync/engine/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 <stddef.h>
6 #include <stdint.h>
7
5 #include "base/bind.h" 8 #include "base/bind.h"
6 #include "base/callback.h" 9 #include "base/callback.h"
7 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
9 #include "base/run_loop.h" 12 #include "base/run_loop.h"
10 #include "base/test/test_timeouts.h" 13 #include "base/test/test_timeouts.h"
11 #include "sync/engine/backoff_delay_provider.h" 14 #include "sync/engine/backoff_delay_provider.h"
12 #include "sync/engine/sync_scheduler_impl.h" 15 #include "sync/engine/sync_scheduler_impl.h"
13 #include "sync/engine/syncer.h" 16 #include "sync/engine/syncer.h"
14 #include "sync/internal_api/public/base/cancelation_signal.h" 17 #include "sync/internal_api/public/base/cancelation_signal.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 ModelTypeSet GetThrottledTypes() { 234 ModelTypeSet GetThrottledTypes() {
232 return scheduler_->nudge_tracker_.GetThrottledTypes(); 235 return scheduler_->nudge_tracker_.GetThrottledTypes();
233 } 236 }
234 237
235 base::TimeDelta GetRetryTimerDelay() { 238 base::TimeDelta GetRetryTimerDelay() {
236 EXPECT_TRUE(scheduler_->retry_timer_.IsRunning()); 239 EXPECT_TRUE(scheduler_->retry_timer_.IsRunning());
237 return scheduler_->retry_timer_.GetCurrentDelay(); 240 return scheduler_->retry_timer_.GetCurrentDelay();
238 } 241 }
239 242
240 static scoped_ptr<InvalidationInterface> BuildInvalidation( 243 static scoped_ptr<InvalidationInterface> BuildInvalidation(
241 int64 version, 244 int64_t version,
242 const std::string& payload) { 245 const std::string& payload) {
243 return MockInvalidation::Build(version, payload); 246 return MockInvalidation::Build(version, payload);
244 } 247 }
245 248
246 private: 249 private:
247 syncable::Directory* directory() { 250 syncable::Directory* directory() {
248 return dir_maker_.directory(); 251 return dir_maker_.directory();
249 } 252 }
250 253
251 base::MessageLoop loop_; 254 base::MessageLoop loop_;
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 ASSERT_TRUE(scheduler()->IsBackingOff()); 1467 ASSERT_TRUE(scheduler()->IsBackingOff());
1465 1468
1466 // Now succeed. 1469 // Now succeed.
1467 connection()->SetServerReachable(); 1470 connection()->SetServerReachable();
1468 PumpLoopFor(2 * delta); 1471 PumpLoopFor(2 * delta);
1469 ASSERT_EQ(1, success_counter.times_called()); 1472 ASSERT_EQ(1, success_counter.times_called());
1470 ASSERT_FALSE(scheduler()->IsBackingOff()); 1473 ASSERT_FALSE(scheduler()->IsBackingOff());
1471 } 1474 }
1472 1475
1473 } // namespace syncer 1476 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_impl.h ('k') | sync/engine/syncer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698