Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: components/invalidation/invalidation_logger.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/infobars/core/infobar_manager.h ('k') | components/invalidation/invalidator_registrar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698