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 // Interface for clients that want to register to receive invalidation notices | |
15 // for object IDs. | |
16 class InvalidationService { | |
akalin
2012/08/20 20:35:01
Okay, how about the name InvalidationFrontend? Su
dcheng
2012/08/20 20:58:21
Done.
| |
17 public: | |
18 virtual ~InvalidationService() { } | |
akalin
2012/08/20 20:35:01
make destructor protected
dcheng
2012/08/20 20:58:21
Done.
| |
19 // Starts sending notifications to |handler|. |handler| must not be NULL, | |
20 // and it must already be registered. | |
akalin
2012/08/20 20:35:01
may as well fix the comment in this patch
dcheng
2012/08/20 20:58:21
Done.
| |
21 // | |
22 // Handler registrations are persisted across restarts of sync. | |
23 virtual void RegisterInvalidationHandler( | |
24 syncer::SyncNotifierObserver* handler) = 0; | |
25 | |
26 // Updates the set of ObjectIds associated with |handler|. |handler| must | |
27 // not be NULL, and must already be registered. An ID must be registered for | |
28 // at most one handler. | |
29 // | |
30 // Registered IDs are persisted across restarts of sync. | |
31 virtual void UpdateRegisteredInvalidationIds( | |
32 syncer::SyncNotifierObserver* handler, | |
33 const syncer::ObjectIdSet& ids) = 0; | |
34 | |
35 // Stops sending notifications to |handler|. |handler| must not be NULL, and | |
36 // it must already be registered. Note that this doesn't unregister the IDs | |
37 // associated with |handler|. | |
38 // | |
39 // Handler registrations are persisted across restarts of sync. | |
40 virtual void UnregisterInvalidationHandler( | |
41 syncer::SyncNotifierObserver* handler) = 0; | |
42 }; | |
43 | |
44 #endif // CHROME_BROWSER_SYNC_INVALIDATION_SERVICE_H_ | |
OLD | NEW |