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

Unified Diff: components/sync/engine_impl/worker_entity_tracker.cc

Issue 2339403004: [Sync] Add two more USS integration tests. (Closed)
Patch Set: Address comments. Created 4 years, 3 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: components/sync/engine_impl/worker_entity_tracker.cc
diff --git a/components/sync/engine_impl/worker_entity_tracker.cc b/components/sync/engine_impl/worker_entity_tracker.cc
index 4177b2b942034312f60f78c9df10971faa321777..e9846d71756cb7eeba0c90cb529606c7daa64a8c 100644
--- a/components/sync/engine_impl/worker_entity_tracker.cc
+++ b/components/sync/engine_impl/worker_entity_tracker.cc
@@ -34,7 +34,6 @@ bool WorkerEntityTracker::HasPendingCommit() const {
void WorkerEntityTracker::PopulateCommitProto(
sync_pb::SyncEntity* commit_entity) const {
DCHECK(HasPendingCommit());
- DCHECK(!client_tag_hash_.empty());
if (!id_.empty()) {
commit_entity->set_id_string(id_);
@@ -125,11 +124,12 @@ void WorkerEntityTracker::ReceiveCommitResponse(CommitResponseData* ack) {
ClearPendingCommit();
}
-void WorkerEntityTracker::ReceiveUpdate(int64_t version) {
- if (version <= highest_gu_response_version_)
+void WorkerEntityTracker::ReceiveUpdate(const UpdateResponseData& update) {
+ if (update.response_version <= highest_gu_response_version_)
return;
- highest_gu_response_version_ = version;
+ highest_gu_response_version_ = update.response_version;
+ id_ = update.entity->id;
// Got an applicable update newer than any pending updates. It must be safe
// to discard the old encrypted update, if there was one.
« no previous file with comments | « components/sync/engine_impl/worker_entity_tracker.h ('k') | components/sync/engine_impl/worker_entity_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698