Index: sync/notifier/invalidation_notifier.cc |
diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc |
index 3a72f32fa61ace7acc53ca566d9ccfe210599e51..7a2a933a054c3712af4c9a7f3d13c678a1fc88b4 100644 |
--- a/sync/notifier/invalidation_notifier.cc |
+++ b/sync/notifier/invalidation_notifier.cc |
@@ -34,10 +34,19 @@ InvalidationNotifier::~InvalidationNotifier() { |
DCHECK(CalledOnValidThread()); |
} |
-void InvalidationNotifier::UpdateRegisteredIds(SyncNotifierObserver* handler, |
- const ObjectIdSet& ids) { |
+void InvalidationNotifier::SetHandler(const std::string& handler_name, |
+ SyncNotifierObserver* handler) { |
DCHECK(CalledOnValidThread()); |
- invalidation_client_.RegisterIds(helper_.UpdateRegisteredIds(handler, ids)); |
+ helper_.SetHandler(handler_name, handler); |
+} |
+ |
+void InvalidationNotifier::UpdateRegisteredIds( |
+ const std::string& handler_name, |
+ const ObjectIdSet& ids) { |
+ DCHECK(CalledOnValidThread()); |
+ helper_.UpdateRegisteredIds(handler_name, ids); |
+ const ObjectIdSet& all_registered_ids = helper_.GetAllRegisteredIds(); |
+ invalidation_client_.RegisterIds(all_registered_ids); |
} |
void InvalidationNotifier::SetUniqueId(const std::string& unique_id) { |