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

Unified Diff: sync/engine/worker_entity_tracker.h

Issue 1933803002: [Sync] USS: Ignore encryption changes during conflict resolution 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment. 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
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.cc ('k') | sync/engine/worker_entity_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/worker_entity_tracker.h
diff --git a/sync/engine/worker_entity_tracker.h b/sync/engine/worker_entity_tracker.h
index fd8645a757201fb0e6e9a18542e1e112462f6042..3979bac50114225c33fe7ae630dd72f24e43a600 100644
--- a/sync/engine/worker_entity_tracker.h
+++ b/sync/engine/worker_entity_tracker.h
@@ -17,6 +17,7 @@
namespace syncer_v2 {
struct CommitRequestData;
+struct CommitResponseData;
struct UpdateResponseData;
// Manages the pending commit and update state for an entity on the sync
@@ -43,24 +44,17 @@ class SYNC_EXPORT WorkerEntityTracker {
// Returns true if this entity should be commited to the server.
bool HasPendingCommit() const;
- // Populates a sync_pb::SyncEntity for a commit. Also sets the
- // |sequence_number|, so we can track it throughout the commit process.
- void PopulateCommitProto(sync_pb::SyncEntity* commit_entity,
- int64_t* sequence_number) const;
+ // Populates a sync_pb::SyncEntity for a commit.
+ void PopulateCommitProto(sync_pb::SyncEntity* commit_entity) const;
// Updates this entity with data from the latest version that the
// model asked us to commit. May clobber state related to the
// model's previous commit attempt(s).
void RequestCommit(const CommitRequestData& data);
- // Handles the receipt of a commit response.
- //
- // Since commits happen entirely on the sync thread, we can safely assume
- // that our item's state at the end of the commit is the same as it was at
- // the start.
- void ReceiveCommitResponse(const std::string& response_id,
- int64_t response_version,
- int64_t sequence_number);
+ // Tracks the receipt of a commit response and fills in some local-only data
+ // on it to be passed back to the processor.
+ void ReceiveCommitResponse(CommitResponseData* ack);
// Handles receipt of an update from the server.
void ReceiveUpdate(int64_t version);
@@ -115,6 +109,9 @@ class SYNC_EXPORT WorkerEntityTracker {
// A commit for this entity waiting for a sync cycle to be committed.
std::unique_ptr<CommitRequestData> pending_commit_;
+ // The specifics hash for the pending commit if there is one, "" otherwise.
+ std::string pending_commit_specifics_hash_;
+
// An update for this entity which can't be applied right now. The presence
// of an pending update prevents commits. As of this writing, the only
// source of pending updates is updates that can't currently be decrypted.
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.cc ('k') | sync/engine/worker_entity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698