Index: chrome/browser/resources/options2/cookies_view.js |
diff --git a/chrome/browser/resources/options2/cookies_view.js b/chrome/browser/resources/options2/cookies_view.js |
index 50a58afa6f0b636fe40c0e34991df3809fa19b4b..e1327e04ebb84e7f1f4eb45b6a1e86def0113e06 100644 |
--- a/chrome/browser/resources/options2/cookies_view.js |
+++ b/chrome/browser/resources/options2/cookies_view.js |
@@ -122,7 +122,26 @@ cr.define('options', function() { |
}; |
CookiesView.loadChildren = function(args) { |
- $('cookies-list').loadChildren(args[0], args[1]); |
+ // TODO(nasko): this should be temporary, until the UI is modified to |
+ // properly account for the new "app" level in the tree model. |
+ if (args[0] == null) { |
+ // We are at the root of the tree, just load the browser wide cookies. |
+ var browser = null; |
+ for (var i = 0; i < args[1].length; ++i) { |
+ if (args[1][i]) { |
Evan Stade
2012/06/21 04:01:41
combine these two if conditions into one with &&
nasko
2012/06/21 16:22:12
Done.
|
+ if (args[1][i].appId == '') { |
Evan Stade
2012/06/21 04:01:41
===
nasko
2012/06/21 16:22:12
Done.
|
+ browser = args[1][i]; |
+ break; |
+ } |
+ } |
+ } |
+ if (browser) { |
+ $('cookies-list').rootId = browser.id; |
+ chrome.send('loadCookie', [browser.id]); |
+ } |
+ } else { |
+ $('cookies-list').loadChildren(args[0], args[1]); |
+ } |
}; |
// Export |