diff options
author | qsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 21:13:33 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-11 21:13:33 +0000 |
commit | 65ad0ec760770b0a81efb66bc490b7bbb580786a (patch) | |
tree | 4e6cb701d9bd29482b7f6d9bd0dad42a713cd104 /sync/engine/syncer_proto_util.h | |
parent | e10392c8a0ec0bc09386d9fe1db1b79e0b2f4f36 (diff) | |
download | chromium_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/engine/syncer_proto_util.h')
-rw-r--r-- | sync/engine/syncer_proto_util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h index b674b50..fab1406 100644 --- a/sync/engine/syncer_proto_util.h +++ b/sync/engine/syncer_proto_util.h @@ -74,6 +74,11 @@ class SyncerProtoUtil { static const std::string& NameFromCommitEntryResponse( const sync_pb::CommitResponse_EntryResponse& entry); + // Persist the bag of chips if it is present in the response. + static void PersistBagOfChips( + syncable::Directory* dir, + const sync_pb::ClientToServerResponse& response); + // EntitySpecifics is used as a filter for the GetUpdates message to tell // the server which datatypes to send back. This adds a datatype so that // it's included in the filter. @@ -92,6 +97,11 @@ class SyncerProtoUtil { static void AddRequestBirthday(syncable::Directory* dir, sync_pb::ClientToServerMessage* msg); + // Pull the bag of chips from the dir and put it into the msg. + static void AddBagOfChips(syncable::Directory* dir, + sync_pb::ClientToServerMessage* msg); + + // Set the protocol version field in the outgoing message. static void SetProtocolVersion(sync_pb::ClientToServerMessage* msg); |