| 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_INVALIDATION_LOGGER_H_ | 5 #ifndef COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ |
| 6 #define COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ | 6 #define COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 // Send to every Observer many OnUpdateIds events, each with one registrar | 70 // Send to every Observer many OnUpdateIds events, each with one registrar |
| 71 // and every objectId it currently has registered. | 71 // and every objectId it currently has registered. |
| 72 void EmitUpdatedIds(); | 72 void EmitUpdatedIds(); |
| 73 | 73 |
| 74 // Send to every Observer a vector with the all the current registered | 74 // Send to every Observer a vector with the all the current registered |
| 75 // handlers. | 75 // handlers. |
| 76 void EmitRegisteredHandlers(); | 76 void EmitRegisteredHandlers(); |
| 77 | 77 |
| 78 // The list of every observer currently listening for notifications. | 78 // The list of every observer currently listening for notifications. |
| 79 ObserverList<InvalidationLoggerObserver> observer_list_; | 79 base::ObserverList<InvalidationLoggerObserver> observer_list_; |
| 80 | 80 |
| 81 // The last InvalidatorState updated by the InvalidatorService. | 81 // The last InvalidatorState updated by the InvalidatorService. |
| 82 syncer::InvalidatorState last_invalidator_state_; | 82 syncer::InvalidatorState last_invalidator_state_; |
| 83 base::Time last_invalidator_state_timestamp_; | 83 base::Time last_invalidator_state_timestamp_; |
| 84 | 84 |
| 85 // The map that contains every object id that is currently registered | 85 // The map that contains every object id that is currently registered |
| 86 // and its owner. | 86 // and its owner. |
| 87 std::map<std::string, syncer::ObjectIdSet> latest_ids_; | 87 std::map<std::string, syncer::ObjectIdSet> latest_ids_; |
| 88 | 88 |
| 89 // The map that counts how many invalidations per objectId there has been. | 89 // The map that counts how many invalidations per objectId there has been. |
| 90 syncer::ObjectIdCountMap invalidation_count_; | 90 syncer::ObjectIdCountMap invalidation_count_; |
| 91 | 91 |
| 92 // The name of all invalidatorHandler registered (note that this is not | 92 // The name of all invalidatorHandler registered (note that this is not |
| 93 // necessarily the same as the keys of latest_ids_, because they might | 93 // necessarily the same as the keys of latest_ids_, because they might |
| 94 // have not registered any object id). | 94 // have not registered any object id). |
| 95 std::multiset<std::string> registered_handlers_; | 95 std::multiset<std::string> registered_handlers_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(InvalidationLogger); | 97 DISALLOW_COPY_AND_ASSIGN(InvalidationLogger); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace invalidation | 100 } // namespace invalidation |
| 101 | 101 |
| 102 #endif // COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ | 102 #endif // COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ |
| OLD | NEW |