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

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: Style fixes + comments 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..1e2eef4369b5e1a790f640ef6a6cb9d2833986fc 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(node_map) {
Dan Beam 2014/04/04 22:36:31 varsLikeThis (e.g. nodeMap)
Dan Beam 2014/04/04 22:36:31 what is nodemap? an array?
rlarocque 2014/04/05 00:07:27 An array of objects. The objects are of the form
rlarocque 2014/04/05 00:07:27 Done.
+ // Put all nodes into one big list that ignores the type.
+ var nodes = node_map
+ .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');

Powered by Google App Engine
This is Rietveld 408576698