| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // Interface to the invalidator, which is an object that receives | 5 // Interface to the invalidator, which is an object that receives |
| 6 // invalidations for registered object IDs. The corresponding | 6 // invalidations for registered object IDs. The corresponding |
| 7 // InvalidationHandler is notifier when such an event occurs. | 7 // InvalidationHandler is notifier when such an event occurs. |
| 8 | 8 |
| 9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_ | 9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_ |
| 10 #define SYNC_NOTIFIER_INVALIDATOR_H_ | 10 #define SYNC_NOTIFIER_INVALIDATOR_H_ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Returns the current invalidator state. When called from within | 76 // Returns the current invalidator state. When called from within |
| 77 // InvalidationHandler::OnInvalidatorStateChange(), this must return | 77 // InvalidationHandler::OnInvalidatorStateChange(), this must return |
| 78 // the updated state. | 78 // the updated state. |
| 79 virtual InvalidatorState GetInvalidatorState() const = 0; | 79 virtual InvalidatorState GetInvalidatorState() const = 0; |
| 80 | 80 |
| 81 // The observers won't be notified of any notifications until | 81 // The observers won't be notified of any notifications until |
| 82 // UpdateCredentials is called at least once. It can be called more than | 82 // UpdateCredentials is called at least once. It can be called more than |
| 83 // once. | 83 // once. |
| 84 virtual void UpdateCredentials( | 84 virtual void UpdateCredentials( |
| 85 const std::string& email, const std::string& token) = 0; | 85 const std::string& email, const std::string& token) = 0; |
| 86 | |
| 87 // This is here only to support the old p2p notification implementation, | |
| 88 // which is still used by sync integration tests. | |
| 89 // TODO(akalin): Remove this once we move the integration tests off p2p | |
| 90 // notifications. | |
| 91 virtual void SendInvalidation( | |
| 92 const ObjectIdInvalidationMap& invalidation_map) = 0; | |
| 93 }; | 86 }; |
| 94 } // namespace syncer | 87 } // namespace syncer |
| 95 | 88 |
| 96 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ | 89 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ |
| OLD | NEW |