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

Unified Diff: sync/notifier/sync_notifier.h

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/sync_notifier.h
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h
index 48bc1f10b44630cda2be44f39fbb6b11ce1f8f34..0730f8a9ed1711f5f90d42a848018fae63d05b9d 100644
--- a/sync/notifier/sync_notifier.h
+++ b/sync/notifier/sync_notifier.h
@@ -22,11 +22,16 @@ class SyncNotifier {
SyncNotifier() {}
virtual ~SyncNotifier() {}
- // Updates the set of ObjectIds associated with a given
- // |handler|. Passing an empty ObjectIdSet will unregister
- // |handler|. There should be at most one handler registered per
- // object id.
- virtual void UpdateRegisteredIds(SyncNotifierObserver* handler,
+ // Sets the handler for the given name. Pass in NULL for |handler|
+ // if you want to remove the handler for the given name. (This
+ // doesn't unregister the IDs for the given name, though.) A
+ // handler must be set for at most one name.
+ virtual void SetHandler(const std::string& handler_name,
+ SyncNotifierObserver* handler) = 0;
+
+ // Updates the set of ObjectIds associated with a given handler (via
+ // its name). An ID must be registered for at most one handler.
+ virtual void UpdateRegisteredIds(const std::string& handler_name,
const ObjectIdSet& ids) = 0;
// SetUniqueId must be called once, before any call to

Powered by Google App Engine
This is Rietveld 408576698