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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc

Issue 7012005: Revert "Revert 84829 - Initial implementation of "Synced Bookmarks" folder." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to set .json eol-style Created 9 years, 7 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/ui/views/bookmarks/bookmark_editor_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
index b8e25efee8cd6f9e592b47ab42fca38ca27a7517..ffc3a698eae91f771e6aef902bd0424d3f2af198 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
@@ -485,9 +485,12 @@ BookmarkEditorView::EditorNode* BookmarkEditorView::CreateRootNode() {
EditorNode* root_node = new EditorNode(std::wstring(), 0);
const BookmarkNode* bb_root_node = bb_model_->root_node();
CreateNodes(bb_root_node, root_node);
- DCHECK(root_node->child_count() == 2);
+ DCHECK(root_node->child_count() >= 2 && root_node->child_count() <= 3);
DCHECK(bb_root_node->GetChild(0)->type() == BookmarkNode::BOOKMARK_BAR);
DCHECK(bb_root_node->GetChild(1)->type() == BookmarkNode::OTHER_NODE);
+ if (root_node->child_count() == 3) {
+ DCHECK(bb_root_node->GetChild(2)->type() == BookmarkNode::SYNCED);
+ }
return root_node;
}
@@ -495,7 +498,7 @@ void BookmarkEditorView::CreateNodes(const BookmarkNode* bb_node,
BookmarkEditorView::EditorNode* b_node) {
for (int i = 0; i < bb_node->child_count(); ++i) {
const BookmarkNode* child_bb_node = bb_node->GetChild(i);
- if (child_bb_node->is_folder()) {
+ if (child_bb_node->IsVisible() && child_bb_node->is_folder()) {
EditorNode* new_b_node =
new EditorNode(WideToUTF16(child_bb_node->GetTitle()),
child_bb_node->id());

Powered by Google App Engine
This is Rietveld 408576698