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..be1867af3f59439e3e8088a5d5d57257a5cb163e 100644 |
--- a/chrome/browser/resources/options2/cookies_view.js |
+++ b/chrome/browser/resources/options2/cookies_view.js |
@@ -122,7 +122,24 @@ 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] && args[1][i].appId === '') { |
+ 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 |