| 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 // 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_ |
| 11 | 11 |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
| 15 #include "sync/notifier/invalidation_util.h" | 15 #include "sync/notifier/invalidation_util.h" |
| 16 #include "sync/notifier/invalidator_state.h" | 16 #include "sync/notifier/invalidator_state.h" |
| 17 #include "sync/notifier/object_id_state_map.h" | 17 #include "sync/notifier/object_id_invalidation_map.h" |
| 18 | 18 |
| 19 namespace syncer { | 19 namespace syncer { |
| 20 class InvalidationHandler; | 20 class InvalidationHandler; |
| 21 | 21 |
| 22 class Invalidator { | 22 class Invalidator { |
| 23 public: | 23 public: |
| 24 Invalidator() {} | 24 Invalidator() {} |
| 25 virtual ~Invalidator() {} | 25 virtual ~Invalidator() {} |
| 26 | 26 |
| 27 // Clients should follow the pattern below: | 27 // Clients should follow the pattern below: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // The observers won't be notified of any notifications until | 82 // The observers won't be notified of any notifications until |
| 83 // UpdateCredentials is called at least once. It can be called more than | 83 // UpdateCredentials is called at least once. It can be called more than |
| 84 // once. | 84 // once. |
| 85 virtual void UpdateCredentials( | 85 virtual void UpdateCredentials( |
| 86 const std::string& email, const std::string& token) = 0; | 86 const std::string& email, const std::string& token) = 0; |
| 87 | 87 |
| 88 // This is here only to support the old p2p notification implementation, | 88 // This is here only to support the old p2p notification implementation, |
| 89 // which is still used by sync integration tests. | 89 // which is still used by sync integration tests. |
| 90 // TODO(akalin): Remove this once we move the integration tests off p2p | 90 // TODO(akalin): Remove this once we move the integration tests off p2p |
| 91 // notifications. | 91 // notifications. |
| 92 virtual void SendInvalidation(const ObjectIdStateMap& id_state_map) = 0; | 92 virtual void SendInvalidation( |
| 93 const ObjectIdInvalidationMap& invalidation_map) = 0; |
| 93 }; | 94 }; |
| 94 } // namespace syncer | 95 } // namespace syncer |
| 95 | 96 |
| 96 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ | 97 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ |
| OLD | NEW |