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

Unified Diff: sync/notifier/invalidation_state_tracker.h

Issue 12092091: Separate sync and invalidation client IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/invalidation_state_tracker.h
diff --git a/sync/notifier/invalidation_state_tracker.h b/sync/notifier/invalidation_state_tracker.h
index 957b9c4d0b5e55bac30255611acb39e1b73d212e..cb912341294cf2c730887c2bfb70aa723f1f4361 100644
--- a/sync/notifier/invalidation_state_tracker.h
+++ b/sync/notifier/invalidation_state_tracker.h
@@ -62,6 +62,12 @@ class InvalidationStateTracker {
// Removes all state tracked for |ids|.
virtual void Forget(const ObjectIdSet& ids) = 0;
+ // The per-client unique ID used to register the invalidation client with the
+ // server. This is used to 'squelch' invalidation notifications that
+ // originate from changes made by this client.
+ virtual void SetInvalidatorClientId(const std::string& data) = 0;
+ virtual std::string GetInvalidatorClientId() const = 0;
+
// Used by invalidation::InvalidationClient for persistence. |data| is an
// opaque blob that an invalidation client can use after a restart to
// bootstrap itself. |data| is binary data (not valid UTF8, embedded nulls,
@@ -69,6 +75,9 @@ class InvalidationStateTracker {
virtual void SetBootstrapData(const std::string& data) = 0;
virtual std::string GetBootstrapData() const = 0;
+ // Erases invalidation versions, client ID, and state stored on disk.
+ virtual void Clear() = 0;
+
// Used for generating our own local ack handles. Generates a new ack handle
// for each object id in |ids|. The result is returned via |callback| posted
// to |task_runner|.
« no previous file with comments | « sync/notifier/invalidation_notifier_unittest.cc ('k') | sync/notifier/invalidator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698