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

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: Removing debugging log statements. 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..fd028a3d9dc470ed2dfdea78b76d1ea399dd6763 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;
}
+ // Now that we know we're not in a conflict state, increase if there have been
maxbogue 2016/09/21 00:57:14 "There's no conflict; increase base_version_ if th
skym 2016/09/22 18:58:51 Done.
+ // successful commits between the creation of this commit data and now.
+ 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