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..3fb4163917a983f197103aa241fccc89cc57f0e6 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,10 +44,8 @@ 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 |
@@ -55,12 +54,10 @@ class SYNC_EXPORT WorkerEntityTracker { |
// 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); |
+ // Since commits happen synchronously on the sync thread, our item's state |
+ // at the end of the commit is the same as it was at the start, which is |
+ // leveraged to let us fill some local-only data in on |ack|. |
skym
2016/04/29 18:43:19
This is phrased like an implementation/definition
maxbogue
2016/05/03 17:46:15
I moved the bulk of the comment to the implementat
|
+ void ReceiveCommitResponse(CommitResponseData* ack); |
// Handles receipt of an update from the server. |
void ReceiveUpdate(int64_t version); |
@@ -115,6 +112,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. |