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

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: Address comments. 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..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);
« no previous file with comments | « sync/internal_api/public/non_blocking_sync_common.cc ('k') | sync/internal_api/shared_model_type_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698