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

Side by Side Diff: sync/notifier/invalidator.h

Issue 12092091: Separate sync and invalidation client IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/notifier/invalidation_state_tracker.h ('k') | sync/notifier/invalidator_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Interface to the invalidator, which is an object that receives 5 // Interface to the invalidator, which is an object that receives
6 // invalidations for registered object IDs. The corresponding 6 // invalidations for registered object IDs. The corresponding
7 // InvalidationHandler is notifier when such an event occurs. 7 // InvalidationHandler is notifier when such an event occurs.
8 8
9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_ 9 #ifndef SYNC_NOTIFIER_INVALIDATOR_H_
10 #define SYNC_NOTIFIER_INVALIDATOR_H_ 10 #define SYNC_NOTIFIER_INVALIDATOR_H_
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Stops sending notifications to |handler|. |handler| must not be NULL, and 67 // Stops sending notifications to |handler|. |handler| must not be NULL, and
68 // it must already be registered. Note that this doesn't unregister the IDs 68 // it must already be registered. Note that this doesn't unregister the IDs
69 // associated with |handler|. 69 // associated with |handler|.
70 virtual void UnregisterHandler(InvalidationHandler* handler) = 0; 70 virtual void UnregisterHandler(InvalidationHandler* handler) = 0;
71 71
72 // Returns the current invalidator state. When called from within 72 // Returns the current invalidator state. When called from within
73 // InvalidationHandler::OnInvalidatorStateChange(), this must return 73 // InvalidationHandler::OnInvalidatorStateChange(), this must return
74 // the updated state. 74 // the updated state.
75 virtual InvalidatorState GetInvalidatorState() const = 0; 75 virtual InvalidatorState GetInvalidatorState() const = 0;
76 76
77 // SetUniqueId must be called once, before any call to
78 // UpdateCredentials. |unique_id| should be a non-empty globally
79 // unique string.
80 virtual void SetUniqueId(const std::string& unique_id) = 0;
81
82 // The observers won't be notified of any notifications until 77 // The observers won't be notified of any notifications until
83 // UpdateCredentials is called at least once. It can be called more than 78 // UpdateCredentials is called at least once. It can be called more than
84 // once. 79 // once.
85 virtual void UpdateCredentials( 80 virtual void UpdateCredentials(
86 const std::string& email, const std::string& token) = 0; 81 const std::string& email, const std::string& token) = 0;
87 82
88 // This is here only to support the old p2p notification implementation, 83 // This is here only to support the old p2p notification implementation,
89 // which is still used by sync integration tests. 84 // which is still used by sync integration tests.
90 // TODO(akalin): Remove this once we move the integration tests off p2p 85 // TODO(akalin): Remove this once we move the integration tests off p2p
91 // notifications. 86 // notifications.
92 virtual void SendInvalidation( 87 virtual void SendInvalidation(
93 const ObjectIdInvalidationMap& invalidation_map) = 0; 88 const ObjectIdInvalidationMap& invalidation_map) = 0;
94 }; 89 };
95 } // namespace syncer 90 } // namespace syncer
96 91
97 #endif // SYNC_NOTIFIER_INVALIDATOR_H_ 92 #endif // SYNC_NOTIFIER_INVALIDATOR_H_
OLDNEW
« no previous file with comments | « sync/notifier/invalidation_state_tracker.h ('k') | sync/notifier/invalidator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698