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

Unified Diff: chrome/browser/resources/settings/site_settings/cookie_tree_node.js

Issue 2451553008: [MD settings] move cookie tree management to cookie tree behavior (Closed)
Patch Set: cleanup extraneous if Created 4 years, 2 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/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..6660c04ed950e259bfa9a39ee6012970c191fc16 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;
@@ -229,30 +214,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 {

Powered by Google App Engine
This is Rietveld 408576698