| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 } | 228 } |
| 229 | 229 |
| 230 base::TimeDelta GetRetryTimerDelay() { | 230 base::TimeDelta GetRetryTimerDelay() { |
| 231 EXPECT_TRUE(scheduler_->retry_timer_.IsRunning()); | 231 EXPECT_TRUE(scheduler_->retry_timer_.IsRunning()); |
| 232 return scheduler_->retry_timer_.GetCurrentDelay(); | 232 return scheduler_->retry_timer_.GetCurrentDelay(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 static scoped_ptr<InvalidationInterface> BuildInvalidation( | 235 static scoped_ptr<InvalidationInterface> BuildInvalidation( |
| 236 int64 version, | 236 int64 version, |
| 237 const std::string& payload) { | 237 const std::string& payload) { |
| 238 return MockInvalidation::Build(version, payload) | 238 return MockInvalidation::Build(version, payload); |
| 239 .PassAs<InvalidationInterface>(); | |
| 240 } | 239 } |
| 241 | 240 |
| 242 private: | 241 private: |
| 243 syncable::Directory* directory() { | 242 syncable::Directory* directory() { |
| 244 return dir_maker_.directory(); | 243 return dir_maker_.directory(); |
| 245 } | 244 } |
| 246 | 245 |
| 247 base::MessageLoop loop_; | 246 base::MessageLoop loop_; |
| 248 TestDirectorySetterUpper dir_maker_; | 247 TestDirectorySetterUpper dir_maker_; |
| 249 CancelationSignal cancelation_signal_; | 248 CancelationSignal cancelation_signal_; |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), | 1369 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), |
| 1371 RecordSyncShare(×))); | 1370 RecordSyncShare(×))); |
| 1372 | 1371 |
| 1373 // Run to wait for retrying. | 1372 // Run to wait for retrying. |
| 1374 RunLoop(); | 1373 RunLoop(); |
| 1375 | 1374 |
| 1376 StopSyncScheduler(); | 1375 StopSyncScheduler(); |
| 1377 } | 1376 } |
| 1378 | 1377 |
| 1379 } // namespace syncer | 1378 } // namespace syncer |
| OLD | NEW |