Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| diff --git a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| index cfb066280e269fc94de4591b346f54048344ccfc..df1e23b189eebba72bcf3b35c8770cd246f6c150 100644 |
| --- a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| +++ b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| @@ -3,21 +3,6 @@ |
| // found in the LICENSE file. |
| /** |
| - * @typedef {{hasChildren: boolean, |
| - * id: string, |
| - * title: string, |
| - * totalUsage: string, |
| - * type: string}} |
| - */ |
| -var CookieDetails; |
| - |
| -/** |
| - * @typedef {{content: string, |
| - * label: string}} |
| - */ |
| -var CookieDataForDisplay; |
| - |
| -/** |
| * @typedef {{title: string, |
| * id: string, |
| * data: CookieDetails}} |
| @@ -40,8 +25,8 @@ var CookieList; |
| /** |
| * @typedef {{id: string, |
| - * start: !number, |
| - * count: !number}} |
| + * start: number, |
| + * count: number}} |
| */ |
| var CookieRemovePacket; |
| @@ -107,6 +92,11 @@ cr.define('settings', function() { |
| parentNode.children_ = nodes; |
| }, |
| + /** @return {!CookieDetails} */ |
| + getCookieDetails: function() { |
|
Dan Beam
2016/10/27 21:05:10
this works, but why not just ... make data_ public
dschuyler
2016/10/27 22:54:25
Done.
|
| + return this.data_; |
| + }, |
| + |
| /** |
| * Looks up a parent node and adds a list of CookieTreeNodes to them. |
| * @param {string} parentId The ID of the parent to add the nodes to. |
| @@ -229,30 +219,6 @@ cr.define('settings', function() { |
| } |
| return null; |
| }, |
| - |
| - /** |
| - * Get cookie data for a given HTML node. |
| - * @return {!Array<CookieDataForDisplay>} |
| - */ |
| - getCookieData: function(item) { |
| - /** @type {!Array<CookieDataForDisplay>} */ |
| - var out = []; |
| - var fields = cookieInfo[item.data_.type]; |
| - for (var field of fields) { |
| - // Iterate through the keys found in |cookieInfo| for the given |type| |
| - // and see if those keys are present in the data. If so, display them |
| - // (in the order determined by |cookieInfo|). |
| - var key = field[0]; |
| - if (item.data_[key].length > 0) { |
| - var entry = /** @type {CookieDataForDisplay} */({ |
| - label: loadTimeData.getString(field[1]), |
| - content: item.data_[key], |
| - }); |
| - out.push(entry); |
| - } |
| - } |
| - return out; |
| - }, |
| }; |
| return { |