Index: chrome/browser/sync/invalidation_service.h |
diff --git a/chrome/browser/sync/invalidation_service.h b/chrome/browser/sync/invalidation_service.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..38ad54801ac650f18725bf51cd9c59cd30fda6dd |
--- /dev/null |
+++ b/chrome/browser/sync/invalidation_service.h |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ |
+#define CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ |
+ |
+#include "sync/notifier/invalidation_util.h" |
+ |
+namespace syncer { |
+class SyncNotifierObserver; |
+} // namespace syncer |
+ |
+// TODO(dcheng): Add an interesting comment here. |
Munjal (Google)
2012/08/14 18:56:37
Did you mean to add a comment here before committi
dcheng
2012/08/14 21:39:59
I've replaced this with a slightly more helpful co
|
+class InvalidationService { |
+ public: |
+ virtual ~InvalidationService() { } |
+ // Starts sending notifications to |handler|. |handler| must not be NULL, |
+ // and it must already be registered. |
Munjal (Google)
2012/08/14 18:56:37
This comment is a bit confusing. Comment says the
dcheng
2012/08/14 21:39:59
Hmm. I copied these comments frmo ProfileSyncServi
|
+ // |
+ // Handler registrations are persisted across restarts of sync. |
+ virtual void RegisterInvalidationHandler( |
+ syncer::SyncNotifierObserver* handler) = 0; |
+ |
+ // Updates the set of ObjectIds associated with |handler|. |handler| must |
+ // not be NULL, and must already be registered. An ID must be registered for |
+ // at most one handler. |
+ // |
+ // Registered IDs are persisted across restarts of sync. |
+ virtual void UpdateRegisteredInvalidationIds( |
+ syncer::SyncNotifierObserver* handler, |
+ const syncer::ObjectIdSet& ids) = 0; |
Munjal (Google)
2012/08/14 18:56:37
Could we instead expose methods to add and remove
dcheng
2012/08/14 21:39:59
This is how the interface looks for now. It was ch
|
+ |
+ // Stops sending notifications to |handler|. |handler| must not be NULL, and |
+ // it must already be registered. Note that this doesn't unregister the IDs |
+ // associated with |handler|. |
Munjal (Google)
2012/08/14 18:56:37
So are object ids shared across handlers? Or in ot
dcheng
2012/08/14 21:39:59
No. "An ID must be registered for at most one hand
|
+ // |
+ // Handler registrations are persisted across restarts of sync. |
+ virtual void UnregisterInvalidationHandler( |
+ syncer::SyncNotifierObserver* handler) = 0; |
+}; |
+ |
+#endif // CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ |