| Index: sync/internal_api/public/processor_entity_tracker.h
|
| diff --git a/sync/internal_api/public/processor_entity_tracker.h b/sync/internal_api/public/processor_entity_tracker.h
|
| index 064f44ebccdf14a088a3c718068f02429cb569bc..1bc0a36925a43749aab0f9d36359734a06108c93 100644
|
| --- a/sync/internal_api/public/processor_entity_tracker.h
|
| +++ b/sync/internal_api/public/processor_entity_tracker.h
|
| @@ -17,6 +17,7 @@
|
|
|
| namespace syncer_v2 {
|
| struct CommitRequestData;
|
| +struct CommitResponseData;
|
| struct UpdateResponseData;
|
|
|
| // This class is used by the SharedModelTypeProcessor to track the state of each
|
| @@ -95,9 +96,7 @@ class SYNC_EXPORT ProcessorEntityTracker {
|
| // unset IsUnsynced(). If many local changes occur in quick succession, it's
|
| // possible that the committed item was already out of date by the time it
|
| // reached the server.
|
| - void ReceiveCommitResponse(const std::string& id,
|
| - int64_t sequence_number,
|
| - int64_t response_version);
|
| + void ReceiveCommitResponse(const CommitResponseData& data);
|
|
|
| // Clears any in-memory sync state associated with outstanding commits.
|
| void ClearTransientSyncState();
|
| @@ -112,13 +111,15 @@ class SYNC_EXPORT ProcessorEntityTracker {
|
| // Check if the instance has cached commit data.
|
| bool HasCommitData() const;
|
|
|
| - // Check whether |specifics| matches the stored specifics_hash.
|
| - bool MatchesSpecificsHash(const sync_pb::EntitySpecifics& specifics) const;
|
| -
|
| - // Check whether |data| matches the stored metadata.
|
| + // Check whether |data| matches the stored specifics hash.
|
| bool MatchesData(const EntityData& data) const;
|
|
|
| - // Increment sequence number in the metadata.
|
| + // Check whether |data| matches the stored base (shared between client and
|
| + // server) specifics hash.
|
| + bool MatchesBaseData(const EntityData& data) const;
|
| +
|
| + // Increment sequence number in the metadata. This will also update the
|
| + // base_specifics_hash if the entity was not already unsynced.
|
| void IncrementSequenceNumber();
|
|
|
| private:
|
| @@ -128,6 +129,9 @@ class SYNC_EXPORT ProcessorEntityTracker {
|
| ProcessorEntityTracker(const std::string& client_tag,
|
| sync_pb::EntityMetadata* metadata);
|
|
|
| + // Check whether |specifics| matches the stored specifics_hash.
|
| + bool MatchesSpecificsHash(const sync_pb::EntitySpecifics& specifics) const;
|
| +
|
| // Update hash string for EntitySpecifics in the metadata.
|
| void UpdateSpecificsHash(const sync_pb::EntitySpecifics& specifics);
|
|
|
|
|