Chromium Code Reviews| 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(); |
|
msw
2012/08/07 20:09:30
nit: comment explaining when |ids| won't match
|a
akalin
2012/08/07 23:38:05
ids is only for |handler_name|/|handler|, but all_
msw
2012/08/08 00:55:23
Ok, I was simply confused. I think it's odd that t
|
| + invalidation_client_.RegisterIds(all_registered_ids); |
| } |
| void InvalidationNotifier::SetUniqueId(const std::string& unique_id) { |