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

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: Rebase Created 7 years, 3 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
Index: sync/notifier/invalidator_registrar.h
diff --git a/sync/notifier/invalidator_registrar.h b/sync/notifier/invalidator_registrar.h
index f2a3c638bda7f571343f2f5adb694e82e35dc454..0890553ff792a0a55551c4cc0b641e88abbe75a1 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> HandlerIdMap;
base::ThreadChecker thread_checker_;
ObserverList<InvalidationHandler> handlers_;
- IdHandlerMap id_to_handler_map_;
+ HandlerIdMap handler_to_id_map_;
tim (not reviewing) 2013/09/20 21:53:46 it's a map to a set, right? handler_to_ids_map?
rlarocque 2013/09/23 18:38:19 Correct. Renamed.
InvalidatorState state_;
DISALLOW_COPY_AND_ASSIGN(InvalidatorRegistrar);

Powered by Google App Engine
This is Rietveld 408576698