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

Unified Diff: chrome/browser/resources/sync_internals/sync_node_browser.js

Issue 224563004: sync: Re-implement getAllNodes WebUI function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix Created 6 years, 9 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/resources/sync_internals/sync_node_browser.js
diff --git a/chrome/browser/resources/sync_internals/sync_node_browser.js b/chrome/browser/resources/sync_internals/sync_node_browser.js
index d20b864e4ec9513c2b37d6ff042e952d2b931ac2..369916457a58562f77250e86c7055e9e0174be87 100644
--- a/chrome/browser/resources/sync_internals/sync_node_browser.js
+++ b/chrome/browser/resources/sync_internals/sync_node_browser.js
@@ -178,7 +178,12 @@
clear();
setLastRefreshTime('In progress since ' + (new Date()).toLocaleString());
- chrome.sync.getAllNodes(function(nodes) {
+ chrome.sync.getAllNodes(function(nodeMap) {
+ // Put all nodes into one big list that ignores the type.
+ var nodes = nodeMap.
+ map(function(x) { return x.nodes; }).
+ reduce(function(a, b) { return a.concat(b); });
+
var treeContainer = $('sync-node-tree-container');
var tree = document.createElement('tree');
tree.setAttribute('id', 'sync-node-tree');
« no previous file with comments | « chrome/browser/resources/sync_internals/data.js ('k') | chrome/browser/resources/sync_internals/sync_search.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698