Index: chrome/browser/resources/bookmark_manager/main.html |
diff --git a/chrome/browser/resources/bookmark_manager/main.html b/chrome/browser/resources/bookmark_manager/main.html |
index 06d966731b249fd94be48bdaadb3ed436bb337ef..b51601c5cc854bba042f6645c78cb0cf12e251f5 100644 |
--- a/chrome/browser/resources/bookmark_manager/main.html |
+++ b/chrome/browser/resources/bookmark_manager/main.html |
@@ -1071,9 +1071,8 @@ function updateOpenCommands(e, command) { |
var multiple = selectionCount != 1 || isFolder; |
function hasBookmarks(node) { |
- var it = new bmm.TreeIterator(node); |
- while (it.moveNext()) { |
- if (!bmm.isFolder(it.current)) |
+ for (var i = 0; i < node.children.length; ++i) { |
arv (Not doing code reviews)
2011/04/06 21:34:24
i++ in js
|
+ if (!bmm.isFolder(node.children[i])) |
return true; |
} |
return false; |
@@ -1448,13 +1447,15 @@ function openBookmarks(kind) { |
var urls = []; |
- // Adds the node and all the descendants |
+ // Adds the node and all its children. |
function addNodes(node) { |
- var it = new bmm.TreeIterator(node); |
- while (it.moveNext()) { |
- var n = it.current; |
- if (!bmm.isFolder(n)) |
- urls.push(n.url); |
+ if (node.children) { |
+ node.children.forEach(function(child) { |
+ if (!bmm.isFolder(child)) |
+ urls.push(child.url); |
+ }); |
+ } else { |
+ urls.push(node.url); |
} |
} |