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

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: Address comments 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
Index: sync/notifier/sync_notifier.h
diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h
index 80b97b892741fedfa11df17a0c645389d27a5aa9..1b01d5d56563eecabf681ccdef34ba9e5b16819f 100644
--- a/sync/notifier/sync_notifier.h
+++ b/sync/notifier/sync_notifier.h
@@ -22,10 +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