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

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

Issue 2350803005: [Sync] Fixing two bugs in the worker revealed by trying to add an encryption integration test. (Closed)
Patch Set: Merging conflict. 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 2b73b20fe1113bf45d33ea8b31466ad6d472b7d7..5e428679e28ff503579135a682268052f0aef1d2 100644
--- a/components/sync/engine_impl/worker_entity_tracker.cc
+++ b/components/sync/engine_impl/worker_entity_tracker.cc
@@ -4,7 +4,7 @@
#include "components/sync/engine_impl/worker_entity_tracker.h"
-#include <stdint.h>
+#include <algorithm>
#include "base/logging.h"
#include "components/sync/base/model_type.h"
@@ -96,6 +96,10 @@ void WorkerEntityTracker::RequestCommit(const CommitRequestData& data) {
return;
}
+ // There's no conflict; increase base_version_ if there was a commit response
+ // the processor didn't know about.
+ base_version_ = std::max(base_version_, highest_commit_response_version_);
+
// Otherwise, keep the data associated with this pending commit
// so it can be committed at the next possible opportunity.
}

Powered by Google App Engine
This is Rietveld 408576698