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

Unified Diff: sync/notifier/invalidation_notifier.cc

Issue 10824252: Revert 150990 - [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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.h ('k') | sync/notifier/invalidation_notifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidation_notifier.cc
===================================================================
--- sync/notifier/invalidation_notifier.cc (revision 150991)
+++ sync/notifier/invalidation_notifier.cc (working copy)
@@ -36,23 +36,14 @@
DCHECK(CalledOnValidThread());
}
-void InvalidationNotifier::RegisterHandler(SyncNotifierObserver* handler) {
- DCHECK(CalledOnValidThread());
- registrar_.RegisterHandler(handler);
-}
-
void InvalidationNotifier::UpdateRegisteredIds(SyncNotifierObserver* handler,
const ObjectIdSet& ids) {
DCHECK(CalledOnValidThread());
- registrar_.UpdateRegisteredIds(handler, ids);
- invalidation_client_.UpdateRegisteredIds(registrar_.GetAllRegisteredIds());
+ const ObjectIdSet& all_registered_ids =
+ helper_.UpdateRegisteredIds(handler, ids);
+ invalidation_client_.UpdateRegisteredIds(all_registered_ids);
}
-void InvalidationNotifier::UnregisterHandler(SyncNotifierObserver* handler) {
- DCHECK(CalledOnValidThread());
- registrar_.UnregisterHandler(handler);
-}
-
void InvalidationNotifier::SetUniqueId(const std::string& unique_id) {
DCHECK(CalledOnValidThread());
invalidation_client_id_ = unique_id;
@@ -102,18 +93,18 @@
void InvalidationNotifier::OnInvalidate(const ObjectIdPayloadMap& id_payloads) {
DCHECK(CalledOnValidThread());
- registrar_.DispatchInvalidationsToHandlers(id_payloads, REMOTE_NOTIFICATION);
+ helper_.DispatchInvalidationsToHandlers(id_payloads, REMOTE_NOTIFICATION);
}
void InvalidationNotifier::OnNotificationsEnabled() {
DCHECK(CalledOnValidThread());
- registrar_.EmitOnNotificationsEnabled();
+ helper_.EmitOnNotificationsEnabled();
}
void InvalidationNotifier::OnNotificationsDisabled(
NotificationsDisabledReason reason) {
DCHECK(CalledOnValidThread());
- registrar_.EmitOnNotificationsDisabled(reason);
+ helper_.EmitOnNotificationsDisabled(reason);
}
} // namespace syncer
« no previous file with comments | « sync/notifier/invalidation_notifier.h ('k') | sync/notifier/invalidation_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698