| 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 // A fake implementation of the SyncScheduler. If needed, we should add default | 5 // A fake implementation of the SyncScheduler. If needed, we should add default |
| 6 // logic needed for tests (invoking callbacks, etc) here rather than in higher | 6 // logic needed for tests (invoking callbacks, etc) here rather than in higher |
| 7 // level test classes. | 7 // level test classes. |
| 8 | 8 |
| 9 #ifndef SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | 9 #ifndef SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ |
| 10 #define SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | 10 #define SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ |
| 11 | 11 |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "sync/engine/sync_scheduler.h" | 13 #include "sync/engine/sync_scheduler.h" |
| 14 | 14 |
| 15 namespace syncer { | 15 namespace syncer { |
| 16 | 16 |
| 17 class FakeSyncScheduler : public SyncScheduler { | 17 class FakeSyncScheduler : public SyncScheduler { |
| 18 public: | 18 public: |
| 19 FakeSyncScheduler(); | 19 FakeSyncScheduler(); |
| 20 ~FakeSyncScheduler() override; | 20 ~FakeSyncScheduler() override; |
| 21 | 21 |
| 22 void Start(Mode mode, base::Time last_poll_time) override; | 22 void Start(Mode mode) override; |
| 23 void Stop() override; | 23 void Stop() override; |
| 24 void ScheduleLocalNudge( | 24 void ScheduleLocalNudge( |
| 25 ModelTypeSet types, | 25 ModelTypeSet types, |
| 26 const tracked_objects::Location& nudge_location) override; | 26 const tracked_objects::Location& nudge_location) override; |
| 27 void ScheduleLocalRefreshRequest( | 27 void ScheduleLocalRefreshRequest( |
| 28 ModelTypeSet types, | 28 ModelTypeSet types, |
| 29 const tracked_objects::Location& nudge_location) override; | 29 const tracked_objects::Location& nudge_location) override; |
| 30 void ScheduleInvalidationNudge( | 30 void ScheduleInvalidationNudge( |
| 31 syncer::ModelType type, | 31 syncer::ModelType type, |
| 32 scoped_ptr<InvalidationInterface> interface, | 32 scoped_ptr<InvalidationInterface> interface, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 51 const std::map<ModelType, base::TimeDelta>& nudge_delays) override; | 51 const std::map<ModelType, base::TimeDelta>& nudge_delays) override; |
| 52 void OnReceivedClientInvalidationHintBufferSize(int size) override; | 52 void OnReceivedClientInvalidationHintBufferSize(int size) override; |
| 53 void OnSyncProtocolError(const SyncProtocolError& error) override; | 53 void OnSyncProtocolError(const SyncProtocolError& error) override; |
| 54 void OnReceivedGuRetryDelay(const base::TimeDelta& delay) override; | 54 void OnReceivedGuRetryDelay(const base::TimeDelta& delay) override; |
| 55 void OnReceivedMigrationRequest(ModelTypeSet types) override; | 55 void OnReceivedMigrationRequest(ModelTypeSet types) override; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace syncer | 58 } // namespace syncer |
| 59 | 59 |
| 60 #endif // SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | 60 #endif // SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ |
| OLD | NEW |