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

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

Issue 9305001: sync: Remove the remaining conflict sets code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Additional comments Created 8 years, 11 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: chrome/browser/sync/engine/syncer_util.cc
diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc
index bf1456e662da5ebf12deedafce8c683dbf9486d9..cf670338048f8349e1b6bc2035b0db2e05bb9532 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/chrome/browser/sync/engine/syncer_util.cc
@@ -333,11 +333,6 @@ UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntry(
}
}
- if (entry->Get(IS_UNSYNCED)) {
- DVLOG(1) << "Skipping update, returning conflict for: " << id
- << " ; it's unsynced.";
- return CONFLICT;
- }
if (!entry->Get(SERVER_IS_DEL)) {
syncable::Id new_parent = entry->Get(SERVER_PARENT_ID);
Entry parent(trans, GET_BY_ID, new_parent);
@@ -348,13 +343,13 @@ UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntry(
// different ways we deal with it once here to reduce the amount of code and
// potential errors.
if (!parent.good() || parent.Get(IS_DEL) || !parent.Get(IS_DIR)) {
- return CONFLICT;
+ return HIERARCHY_CONFLICT;
rlarocque 2012/01/31 19:12:17 There is a subtle side-effect to this change, whic
Nicolas Zea 2012/02/01 19:16:19 So I'm clear, the only side effect here is that we
rlarocque 2012/02/02 00:32:56 Yes, that is correct.
}
if (entry->Get(PARENT_ID) != new_parent) {
if (!entry->Get(IS_DEL) && !IsLegalNewParent(trans, id, new_parent)) {
DVLOG(1) << "Not updating item " << id
<< ", illegal new parent (would cause loop).";
- return CONFLICT;
+ return HIERARCHY_CONFLICT;
}
}
} else if (entry->Get(IS_DIR)) {
@@ -364,10 +359,16 @@ UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntry(
// If we have still-existing children, then we need to deal with
// them before we can process this change.
DVLOG(1) << "Not deleting directory; it's not empty " << *entry;
- return CONFLICT;
+ return HIERARCHY_CONFLICT;
}
}
+ if (entry->Get(IS_UNSYNCED)) {
rlarocque 2012/01/31 19:12:17 This was moved down here because it's important th
+ DVLOG(1) << "Skipping update, returning conflict for: " << id
+ << " ; it's unsynced.";
+ return CONFLICT;
+ }
+
if (specifics.has_encrypted()) {
DVLOG(2) << "Received a decryptable "
<< syncable::ModelTypeToString(entry->GetServerModelType())

Powered by Google App Engine
This is Rietveld 408576698