| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ | 5 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ |
| 6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ | 6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "components/invalidation/public/invalidation_util.h" | 8 #include "components/invalidation/public/invalidation_util.h" |
| 9 #include "components/invalidation/public/invalidator_state.h" | 9 #include "components/invalidation/public/invalidator_state.h" |
| 10 #include "components/invalidation/public/object_id_invalidation_map.h" | 10 #include "components/invalidation/public/object_id_invalidation_map.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class DictionaryValue; | 13 class DictionaryValue; |
| 14 } // namespace base | 14 } // namespace base |
| 15 | 15 |
| 16 namespace syncer { | 16 namespace syncer { |
| 17 class InvalidationHandler; | |
| 18 class ObjectIdInvalidationMap; | 17 class ObjectIdInvalidationMap; |
| 19 } // namespace syncer | 18 } // namespace syncer |
| 20 | 19 |
| 21 namespace invalidation { | 20 namespace invalidation { |
| 22 // This class provides the possibilty to register as an observer for the | 21 // This class provides the possibilty to register as an observer for the |
| 23 // InvalidationLogger notifications whenever an InvalidatorService changes | 22 // InvalidationLogger notifications whenever an InvalidatorService changes |
| 24 // its internal state. | 23 // its internal state. |
| 25 // (i.e. A new registration, a new invalidation, a TICL/GCM state change) | 24 // (i.e. A new registration, a new invalidation, a TICL/GCM state change) |
| 26 class InvalidationLoggerObserver { | 25 class InvalidationLoggerObserver { |
| 27 public: | 26 public: |
| 28 virtual void OnRegistrationChange( | 27 virtual void OnRegistrationChange( |
| 29 const std::multiset<std::string>& registered_handlers) = 0; | 28 const std::multiset<std::string>& registered_handlers) = 0; |
| 30 virtual void OnStateChange(const syncer::InvalidatorState& new_state, | 29 virtual void OnStateChange(const syncer::InvalidatorState& new_state, |
| 31 const base::Time& last_change_timestamp) = 0; | 30 const base::Time& last_change_timestamp) = 0; |
| 32 virtual void OnUpdateIds(const std::string& handler_name, | 31 virtual void OnUpdateIds(const std::string& handler_name, |
| 33 const syncer::ObjectIdCountMap& details) = 0; | 32 const syncer::ObjectIdCountMap& details) = 0; |
| 34 virtual void OnDebugMessage(const base::DictionaryValue& details) = 0; | 33 virtual void OnDebugMessage(const base::DictionaryValue& details) = 0; |
| 35 virtual void OnInvalidation( | 34 virtual void OnInvalidation( |
| 36 const syncer::ObjectIdInvalidationMap& details) = 0; | 35 const syncer::ObjectIdInvalidationMap& details) = 0; |
| 37 virtual void OnDetailedStatus(const base::DictionaryValue& details) = 0; | 36 virtual void OnDetailedStatus(const base::DictionaryValue& details) = 0; |
| 38 | 37 |
| 39 protected: | 38 protected: |
| 40 virtual ~InvalidationLoggerObserver() {} | 39 virtual ~InvalidationLoggerObserver() {} |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 } // namespace invalidation | 42 } // namespace invalidation |
| 44 | 43 |
| 45 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ | 44 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_LOGGER_OBSERVER_H_ |
| OLD | NEW |