Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 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 | |
| 7 // level test classes. | |
| 8 | |
| 9 #ifndef SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | |
| 10 #define SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | |
| 11 | |
| 12 #include "base/message_loop.h" | |
| 13 #include "sync/engine/sync_scheduler.h" | |
| 14 | |
| 15 namespace syncer { | |
| 16 | |
| 17 class FakeSyncScheduler : public SyncScheduler { | |
| 18 public: | |
| 19 FakeSyncScheduler(); | |
| 20 virtual ~FakeSyncScheduler(); | |
| 21 | |
| 22 virtual void Start(Mode mode) OVERRIDE; | |
| 23 virtual void RequestStop(const base::Closure& callback) OVERRIDE; | |
| 24 virtual void ScheduleNudgeAsync( | |
| 25 const base::TimeDelta& delay, | |
| 26 NudgeSource source, | |
| 27 ModelTypeSet types, | |
| 28 const tracked_objects::Location& nudge_location) OVERRIDE; | |
| 29 virtual void ScheduleNudgeWithPayloadsAsync( | |
| 30 const base::TimeDelta& delay, NudgeSource source, | |
| 31 const ModelTypePayloadMap& types_with_payloads, | |
| 32 const tracked_objects::Location& nudge_location) OVERRIDE; | |
| 33 virtual bool ScheduleConfiguration(const ConfigurationParams& params); | |
| 34 virtual void SetNotificationsEnabled(bool notifications_enabled) OVERRIDE; | |
| 35 | |
| 36 // SyncSession::Delegate implementation. | |
| 37 virtual void OnSilencedUntil( | |
| 38 const base::TimeTicks& silenced_until) OVERRIDE; | |
| 39 virtual bool IsSyncingCurrentlySilenced() OVERRIDE; | |
| 40 virtual void OnReceivedShortPollIntervalUpdate( | |
| 41 const base::TimeDelta& new_interval) OVERRIDE; | |
| 42 virtual void OnReceivedLongPollIntervalUpdate( | |
| 43 const base::TimeDelta& new_interval) OVERRIDE; | |
| 44 virtual void OnReceivedSessionsCommitDelay( | |
| 45 const base::TimeDelta& new_delay) OVERRIDE; | |
| 46 virtual void OnShouldStopSyncingPermanently() OVERRIDE; | |
| 47 virtual void OnSyncProtocolError( | |
| 48 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; | |
|
Nicolas Zea
2012/07/18 21:10:12
nit: newline after
tim (not reviewing)
2012/07/18 21:57:47
Done.
| |
| 49 private: | |
| 50 MessageLoop* const created_on_loop_; | |
| 51 }; | |
| 52 | |
| 53 } // namespace csync | |
|
Nicolas Zea
2012/07/18 21:10:12
csync -> syncer
tim (not reviewing)
2012/07/18 21:57:47
Done.
| |
| 54 | |
| 55 #endif // SYNC_TEST_ENGINE_FAKE_SYNC_SCHEDULER_H_ | |
| OLD | NEW |