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

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

Issue 8922015: [Sync] Don't commit items with predecessors/parents in conflict. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments. Add racy test case 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..6bb410b5ef25bb8bd25a7777090dbbc6212f060c 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/chrome/browser/sync/engine/syncer_util.cc
@@ -543,27 +543,6 @@ void SyncerUtil::UpdateLocalDataFromServerData(
}
// static
-VerifyCommitResult SyncerUtil::ValidateCommitEntry(
- syncable::Entry* entry) {
- syncable::Id id = entry->Get(ID);
- if (id == entry->Get(PARENT_ID)) {
- CHECK(id.IsRoot()) << "Non-root item is self parenting." << *entry;
- // If the root becomes unsynced it can cause us problems.
- LOG(ERROR) << "Root item became unsynced " << *entry;
- return VERIFY_UNSYNCABLE;
- }
- if (entry->IsRoot()) {
- LOG(ERROR) << "Permanent item became unsynced " << *entry;
- return VERIFY_UNSYNCABLE;
- }
- if (entry->Get(IS_DEL) && !entry->Get(ID).ServerKnows()) {
- // Drop deleted uncommitted entries.
- return VERIFY_UNSYNCABLE;
- }
- return VERIFY_OK;
-}
-
-// static
bool SyncerUtil::AddItemThenPredecessors(
syncable::BaseTransaction* trans,
syncable::Entry* item,

Powered by Google App Engine
This is Rietveld 408576698