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

Unified Diff: chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc

Issue 3054021: Sync: set BASE_VERSION to entry.version() instead of 0 when changing (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Sync to trunk; add comment per chron. Created 10 years, 5 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 | « no previous file | chrome/browser/sync/engine/process_updates_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
diff --git a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
index ca27be01642fb86eb665900de0bb970e0814ad15..2fd6b305ec6f524583d3234c2a85a434691eaa57 100644
--- a/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
+++ b/chrome/browser/sync/engine/build_and_process_conflict_sets_command.cc
@@ -227,12 +227,12 @@ void BuildAndProcessConflictSetsCommand::BuildConflictSets(
set<syncable::Id>::iterator i = conflict_progress->ConflictingItemsBegin();
while (i != conflict_progress->ConflictingItemsEnd()) {
syncable::Entry entry(trans, syncable::GET_BY_ID, *i);
- CHECK(entry.good());
- if (!entry.Get(syncable::IS_UNSYNCED) &&
- !entry.Get(syncable::IS_UNAPPLIED_UPDATE)) {
+ if (!entry.good() ||
+ (!entry.Get(syncable::IS_UNSYNCED) &&
+ !entry.Get(syncable::IS_UNAPPLIED_UPDATE))) {
// This can happen very rarely. It means we had a simply conflicting item
- // that randomly committed. We drop the entry as it's no longer
- // conflicting.
+ // that randomly committed; its ID could have changed during the commit.
+ // We drop the entry as it's no longer conflicting.
conflict_progress->EraseConflictingItemById(*(i++));
continue;
}
« no previous file with comments | « no previous file | chrome/browser/sync/engine/process_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698