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

Unified Diff: chrome/browser/extensions/extension_bookmark_helpers.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/extensions/extension_bookmark_helpers.cc
diff --git a/chrome/browser/extensions/extension_bookmark_helpers.cc b/chrome/browser/extensions/extension_bookmark_helpers.cc
index a66839c8358bfbd8944924b994d027b7f82e8e4a..36b6a73ae5a173724015c22e88a1a9e7a507ca49 100644
--- a/chrome/browser/extensions/extension_bookmark_helpers.cc
+++ b/chrome/browser/extensions/extension_bookmark_helpers.cc
@@ -50,7 +50,7 @@ DictionaryValue* GetNodeDictionary(const BookmarkNode* node,
ListValue* children = new ListValue();
for (int i = 0; i < childCount; ++i) {
const BookmarkNode* child = node->GetChild(i);
- if (!only_folders || child->is_folder()) {
+ if (child->IsVisible() && (!only_folders || child->is_folder())) {
DictionaryValue* dict = GetNodeDictionary(child, true, only_folders);
children->Append(dict);
}
@@ -64,8 +64,10 @@ void AddNode(const BookmarkNode* node,
ListValue* list,
bool recurse,
bool only_folders) {
- DictionaryValue* dict = GetNodeDictionary(node, recurse, only_folders);
- list->Append(dict);
+ if (node->IsVisible()) {
+ DictionaryValue* dict = GetNodeDictionary(node, recurse, only_folders);
+ list->Append(dict);
+ }
}
// Add a JSON representation of |node| to the JSON |list|.
@@ -76,8 +78,8 @@ void AddNode(const BookmarkNode* node,
}
void AddNodeFoldersOnly(const BookmarkNode* node,
- ListValue* list,
- bool recurse) {
+ ListValue* list,
+ bool recurse) {
return AddNode(node, list, recurse, true);
}
@@ -92,6 +94,7 @@ bool RemoveNode(BookmarkModel* model,
}
if (node == model->root_node() ||
node == model->other_node() ||
+ node == model->synced_node() ||
node == model->GetBookmarkBarNode()) {
*error = keys::kModifySpecialError;
return false;
« no previous file with comments | « chrome/browser/bookmarks/recently_used_folders_combo_model.cc ('k') | chrome/browser/extensions/extension_bookmarks_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698