OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_ |
| 7 |
| 8 #include "sync/notifier/invalidator.h" |
| 9 |
| 10 // A fake invalidator that does nothing, and stays in a "transient" error state. |
| 11 // This is useful for cases where we know that invalidations won't work, but |
| 12 // still want to keep Sync running without them |
| 13 class DummyInvalidator : public syncer::Invalidator { |
| 14 public: |
| 15 DummyInvalidator(); |
| 16 virtual ~DummyInvalidator(); |
| 17 |
| 18 virtual void RegisterHandler(syncer::InvalidationHandler* handler) OVERRIDE; |
| 19 virtual void UpdateRegisteredIds(syncer::InvalidationHandler* handler, |
| 20 const syncer::ObjectIdSet& ids) OVERRIDE; |
| 21 virtual void UnregisterHandler(syncer::InvalidationHandler* handler) OVERRIDE; |
| 22 virtual void Acknowledge(const invalidation::ObjectId& id, |
| 23 const syncer::AckHandle& ack_handle) OVERRIDE; |
| 24 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; |
| 25 virtual void UpdateCredentials( |
| 26 const std::string& email, const std::string& token) OVERRIDE; |
| 27 virtual void SendInvalidation( |
| 28 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; |
| 29 |
| 30 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(DummyInvalidator); |
| 32 }; |
| 33 |
| 34 #endif // CHROME_BROWSER_SYNC_GLUE_DUMMY_INVALIDATOR_H_ |
OLD | NEW |