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

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

Issue 657783002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 "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
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
1370 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess), 1369 .WillOnce(DoAll(Invoke(sessions::test_util::SimulateNormalSuccess),
1371 RecordSyncShare(&times))); 1370 RecordSyncShare(&times)));
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
OLDNEW
« no previous file with comments | « sync/engine/get_updates_processor_unittest.cc ('k') | sync/internal_api/attachments/attachment_service_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698