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

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

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 years, 1 month 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
« no previous file with comments | « chromeos/dbus/update_engine_client.cc ('k') | components/invalidation/invalidation_logger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void OnDebugMessage(const base::DictionaryValue& details); 53 void OnDebugMessage(const base::DictionaryValue& details);
54 void OnInvalidation(const syncer::ObjectIdInvalidationMap& details); 54 void OnInvalidation(const syncer::ObjectIdInvalidationMap& details);
55 55
56 // Triggers messages to be sent to the Observers to provide them with 56 // Triggers messages to be sent to the Observers to provide them with
57 // the current state of the logging. 57 // the current state of the logging.
58 void EmitContent(); 58 void EmitContent();
59 59
60 // Add and remove observers listening for messages. 60 // Add and remove observers listening for messages.
61 void RegisterObserver(InvalidationLoggerObserver* debug_observer); 61 void RegisterObserver(InvalidationLoggerObserver* debug_observer);
62 void UnregisterObserver(InvalidationLoggerObserver* debug_observer); 62 void UnregisterObserver(InvalidationLoggerObserver* debug_observer);
63 bool IsObserverRegistered(InvalidationLoggerObserver* debug_observer); 63 bool IsObserverRegistered(
64 const InvalidationLoggerObserver* debug_observer) const;
64 65
65 private: 66 private:
66 // Send to every Observer a OnStateChange event with the latest state. 67 // Send to every Observer a OnStateChange event with the latest state.
67 void EmitState(); 68 void EmitState();
68 69
69 // Send to every Observer many OnUpdateIds events, each with one registrar 70 // Send to every Observer many OnUpdateIds events, each with one registrar
70 // and every objectId it currently has registered. 71 // and every objectId it currently has registered.
71 void EmitUpdatedIds(); 72 void EmitUpdatedIds();
72 73
73 // 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
(...skipping 18 matching lines...) Expand all
92 // 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
93 // have not registered any object id). 94 // have not registered any object id).
94 std::multiset<std::string> registered_handlers_; 95 std::multiset<std::string> registered_handlers_;
95 96
96 DISALLOW_COPY_AND_ASSIGN(InvalidationLogger); 97 DISALLOW_COPY_AND_ASSIGN(InvalidationLogger);
97 }; 98 };
98 99
99 } // namespace invalidation 100 } // namespace invalidation
100 101
101 #endif // COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_ 102 #endif // COMPONENTS_INVALIDATION_INVALIDATION_LOGGER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/update_engine_client.cc ('k') | components/invalidation/invalidation_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698