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

Unified Diff: sync/notifier/invalidator_registrar.cc

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/notifier/invalidator_registrar.h ('k') | sync/notifier/invalidator_registrar_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidator_registrar.cc
diff --git a/sync/notifier/invalidator_registrar.cc b/sync/notifier/invalidator_registrar.cc
index a7ac5b08768696fcc0f90715233ce122431d1d87..03b401a3505661e1bd760b77462754b9ff1a3e3f 100644
--- a/sync/notifier/invalidator_registrar.cc
+++ b/sync/notifier/invalidator_registrar.cc
@@ -63,6 +63,19 @@ void InvalidatorRegistrar::UnregisterHandler(InvalidationHandler* handler) {
handlers_.RemoveObserver(handler);
}
+ObjectIdSet InvalidatorRegistrar::GetRegisteredIds(
+ InvalidationHandler* handler) const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ ObjectIdSet registered_ids;
+ for (IdHandlerMap::const_iterator it = id_to_handler_map_.begin();
+ it != id_to_handler_map_.end(); ++it) {
+ if (it->second == handler) {
+ registered_ids.insert(it->first);
+ }
+ }
+ return registered_ids;
+}
+
ObjectIdSet InvalidatorRegistrar::GetAllRegisteredIds() const {
DCHECK(thread_checker_.CalledOnValidThread());
ObjectIdSet registered_ids;
@@ -120,19 +133,6 @@ bool InvalidatorRegistrar::IsHandlerRegisteredForTest(
return handlers_.HasObserver(handler);
}
-ObjectIdSet InvalidatorRegistrar::GetRegisteredIdsForTest(
- InvalidationHandler* handler) const {
- DCHECK(thread_checker_.CalledOnValidThread());
- ObjectIdSet registered_ids;
- for (IdHandlerMap::const_iterator it = id_to_handler_map_.begin();
- it != id_to_handler_map_.end(); ++it) {
- if (it->second == handler) {
- registered_ids.insert(it->first);
- }
- }
- return registered_ids;
-}
-
void InvalidatorRegistrar::DetachFromThreadForTest() {
DCHECK(thread_checker_.CalledOnValidThread());
thread_checker_.DetachFromThread();
« no previous file with comments | « sync/notifier/invalidator_registrar.h ('k') | sync/notifier/invalidator_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698