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

Unified Diff: chrome/browser/sync/glue/bookmark_model_associator.cc

Issue 8396022: [Sync] Add HasChildren() function and use it instead of GetFirstChildId() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 2 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/glue/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index 720632cf91bab4c6961ba12ededd6f0aeb3fd69c..0e307c12fe8110102275fc47c291291cb9edcbe5 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -275,10 +275,9 @@ bool BookmarkModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
// Sync model has user created nodes if either one of the permanent nodes
// has children.
- *has_nodes = bookmark_bar_node.GetFirstChildId() != sync_api::kInvalidId ||
- other_bookmarks_node.GetFirstChildId() != sync_api::kInvalidId ||
- (has_synced_folder &&
- synced_bookmarks_node.GetFirstChildId() != sync_api::kInvalidId);
+ *has_nodes = bookmark_bar_node.HasChildren() ||
+ other_bookmarks_node.HasChildren() ||
+ (has_synced_folder && synced_bookmarks_node.HasChildren());
return true;
}
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/sync/glue/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698