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

Unified Diff: sync/notifier/invalidator_registrar.h

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move DEPS rule Created 7 years, 2 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/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidator_registrar.h
diff --git a/sync/notifier/invalidator_registrar.h b/sync/notifier/invalidator_registrar.h
index f2a3c638bda7f571343f2f5adb694e82e35dc454..fb6b3881c3c9016a3eb8267f7f228151ac56a356 100644
--- a/sync/notifier/invalidator_registrar.h
+++ b/sync/notifier/invalidator_registrar.h
@@ -13,7 +13,6 @@
#include "sync/base/sync_export.h"
#include "sync/notifier/invalidation_handler.h"
#include "sync/notifier/invalidation_util.h"
-#include "sync/notifier/object_id_invalidation_map.h"
namespace invalidation {
class ObjectId;
@@ -21,6 +20,8 @@ class ObjectId;
namespace syncer {
+class ObjectIdInvalidationMap;
+
// A helper class for implementations of the Invalidator interface. It helps
// keep track of registered handlers and which object ID registrations are
// associated with which handlers, so implementors can just reuse the logic
@@ -76,15 +77,11 @@ class SYNC_EXPORT InvalidatorRegistrar {
void DetachFromThreadForTest();
private:
- typedef std::map<invalidation::ObjectId, InvalidationHandler*,
- ObjectIdLessThan>
- IdHandlerMap;
-
- InvalidationHandler* ObjectIdToHandler(const invalidation::ObjectId& id);
+ typedef std::map<InvalidationHandler*, ObjectIdSet> HandlerIdsMap;
base::ThreadChecker thread_checker_;
ObserverList<InvalidationHandler> handlers_;
- IdHandlerMap id_to_handler_map_;
+ HandlerIdsMap handler_to_ids_map_;
InvalidatorState state_;
DISALLOW_COPY_AND_ASSIGN(InvalidatorRegistrar);
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698