summaryrefslogtreecommitdiffstats
path: root/sync/syncable/directory.h
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-11 21:13:33 +0000
committerqsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-11 21:13:33 +0000
commit65ad0ec760770b0a81efb66bc490b7bbb580786a (patch)
tree4e6cb701d9bd29482b7f6d9bd0dad42a713cd104 /sync/syncable/directory.h
parente10392c8a0ec0bc09386d9fe1db1b79e0b2f4f36 (diff)
downloadchromium_src-65ad0ec760770b0a81efb66bc490b7bbb580786a.zip
chromium_src-65ad0ec760770b0a81efb66bc490b7bbb580786a.tar.gz
chromium_src-65ad0ec760770b0a81efb66bc490b7bbb580786a.tar.bz2
Implement a bag of chips for sync.
The bag of chips is a per-client state used by the server. This state is stored on the client and send back to the server on all communication. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10916174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/directory.h')
-rw-r--r--sync/syncable/directory.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index b34882f..49d598c 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -170,6 +170,10 @@ class Directory {
int64 next_id;
// The persisted notification state.
std::string notification_state;
+ // The serialized bag of chips we were given by the server. Contents are
+ // opaque to the client. This is the serialization of a message of type
+ // ChipBag defined in sync.proto. It can contains NULL characters.
+ std::string bag_of_chips;
};
// What the Directory needs on initialization to create itself and its Kernel.
@@ -260,6 +264,11 @@ class Directory {
std::string store_birthday() const;
void set_store_birthday(const std::string& store_birthday);
+ // (Account) Bag of chip is an opaque state used by the server to track the
+ // client.
+ std::string bag_of_chips() const;
+ void set_bag_of_chips(const std::string& bag_of_chips);
+
std::string GetNotificationState() const;
void SetNotificationState(const std::string& notification_state);