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

Unified Diff: sync/internal_api/write_node.cc

Issue 1226213002: Sync: Support nodes with implicit permanent folders: Node Browser and out-of-order loading from DB (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed memory leak Created 5 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
Index: sync/internal_api/write_node.cc
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc
index f3852b0f51b5cea1d40088ce3952843e4f476151..825e2eda0fd82f1b9200b396f0642fcce55ef00e 100644
--- a/sync/internal_api/write_node.cc
+++ b/sync/internal_api/write_node.cc
@@ -385,8 +385,8 @@ WriteNode::InitUniqueByCreationResult WriteNode::InitUniqueByCreationImpl(
// We don't support directory and tag combinations.
entry_->PutIsDir(false);
- if (!parent_id.IsNull()) {
- if (!PutPredecessor(NULL))
+ if (entry_->ShouldMaintainPosition()) {
+ if (!entry_->PutPredecessor(syncable::Id()))
return INIT_FAILED_SET_PREDECESSOR;
}

Powered by Google App Engine
This is Rietveld 408576698