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

Unified Diff: sync/internal_api/public/processor_entity_tracker.h

Issue 1918923002: [Sync] USS: Ignore encryption changes during conflict resolution 1/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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..c38e5f4c2f6a28783bb381e96636771f5e1857be 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.
bool MatchesData(const EntityData& data) const;
- // Increment sequence number in the metadata.
+ // Check whether |data| matches the stored base (shared between client and
+ // server) metadata.
pavely 2016/04/26 20:59:39 Replace "metadata" with "data" or "specifics".
maxbogue 2016/04/27 17:28:53 Went with "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);

Powered by Google App Engine
This is Rietveld 408576698