Index: sync/notifier/sync_notifier.h |
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h |
index 24c59a018c4f8126ef6a7f0457cae941a6597a47..68e9a85015779a96164302855aa78d1e0057bdb9 100644 |
--- a/sync/notifier/sync_notifier.h |
+++ b/sync/notifier/sync_notifier.h |
@@ -12,6 +12,7 @@ |
#include <string> |
#include "sync/internal_api/public/base/model_type.h" |
+#include "sync/notifier/invalidation_util.h" |
namespace syncer { |
class SyncNotifierObserver; |
@@ -21,8 +22,11 @@ class SyncNotifier { |
SyncNotifier() {} |
virtual ~SyncNotifier() {} |
- virtual void AddObserver(SyncNotifierObserver* observer) = 0; |
- virtual void RemoveObserver(SyncNotifierObserver* observer) = 0; |
+ // Updates the set of ObjectIds associated with a given |handler|. Passing an |
+ // empty ObjectIdSet will unregister |handler|. If two different handlers |
+ // attempt to register for the same object ID, the first registration wins. |
akalin
2012/07/20 19:04:54
oh, I see that you're already aware of the existin
dcheng
2012/07/21 00:09:54
That seems reasonable. I've updated the patch to b
|
+ virtual void UpdateRegisteredIds(SyncNotifierObserver* handler, |
+ const ObjectIdSet& ids) = 0; |
// SetUniqueId must be called once, before any call to |
// UpdateCredentials. |unique_id| should be a non-empty globally |
@@ -40,8 +44,6 @@ class SyncNotifier { |
virtual void UpdateCredentials( |
const std::string& email, const std::string& token) = 0; |
- virtual void UpdateEnabledTypes(syncer::ModelTypeSet enabled_types) = 0; |
- |
// This is here only to support the old p2p notification implementation, |
// which is still used by sync integration tests. |
// TODO(akalin): Remove this once we move the integration tests off p2p |