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

Unified Diff: sync/notifier/invalidation_notifier.cc

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove now-unneeded param Created 8 years, 5 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/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) {

Powered by Google App Engine
This is Rietveld 408576698