OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ | |
6 #define CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ | |
7 | |
8 #include "sync/notifier/invalidation_util.h" | |
9 | |
10 namespace syncer { | |
11 class SyncNotifierObserver; | |
12 } // namespace syncer | |
13 | |
14 // 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
| |
15 class InvalidationService { | |
16 public: | |
17 virtual ~InvalidationService() { } | |
18 // Starts sending notifications to |handler|. |handler| must not be NULL, | |
19 // 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
| |
20 // | |
21 // Handler registrations are persisted across restarts of sync. | |
22 virtual void RegisterInvalidationHandler( | |
23 syncer::SyncNotifierObserver* handler) = 0; | |
24 | |
25 // Updates the set of ObjectIds associated with |handler|. |handler| must | |
26 // not be NULL, and must already be registered. An ID must be registered for | |
27 // at most one handler. | |
28 // | |
29 // Registered IDs are persisted across restarts of sync. | |
30 virtual void UpdateRegisteredInvalidationIds( | |
31 syncer::SyncNotifierObserver* handler, | |
32 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
| |
33 | |
34 // Stops sending notifications to |handler|. |handler| must not be NULL, and | |
35 // it must already be registered. Note that this doesn't unregister the IDs | |
36 // 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
| |
37 // | |
38 // Handler registrations are persisted across restarts of sync. | |
39 virtual void UnregisterInvalidationHandler( | |
40 syncer::SyncNotifierObserver* handler) = 0; | |
41 }; | |
42 | |
43 #endif // CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ | |
OLD | NEW |