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

Side by Side Diff: chrome/browser/resources/settings/site_settings/cookie_tree_node.js

Issue 2457633002: [MD settings] collapse cookie details in subpage (Closed)
Patch Set: merge Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @typedef {{title: string, 6 * @typedef {{title: string,
7 * id: string, 7 * id: string,
8 * data: CookieDetails}} 8 * data: CookieDetails}}
9 */ 9 */
10 var CookieDataItem; 10 var CookieDataItem;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 var node = id == null ? this : this.fetchNodeById(id, true); 132 var node = id == null ? this : this.fetchNodeById(id, true);
133 node.children_.splice(firstChild, count); 133 node.children_.splice(firstChild, count);
134 }, 134 },
135 135
136 /** 136 /**
137 * Returns an array of cookies from the current node within the cookie tree. 137 * Returns an array of cookies from the current node within the cookie tree.
138 * @return {!Array<!CookieDataItem>} The Cookie List. 138 * @return {!Array<!CookieDataItem>} The Cookie List.
139 */ 139 */
140 getCookieList: function() { 140 getCookieList: function() {
141 var list = []; 141 var list = [];
142 for (var group of this.children_) { 142 for (var child of this.children_) {
143 for (var cookie of group.children_) { 143 for (var cookie of child.children_) {
144 list.push({title: cookie.data_.title, 144 list.push({title: cookie.data_.title,
145 id: cookie.data_.id, 145 id: cookie.data_.id,
146 data: cookie.data_}); 146 data: cookie.data_});
147 } 147 }
148 } 148 }
149 return list; 149 return list;
150 }, 150 },
151 151
152 /** 152 /**
153 * Get a summary list of all sites and their stored data. 153 * Get a summary list of all sites and their stored data.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 } 235 }
236 return null; 236 return null;
237 }, 237 },
238 }; 238 };
239 239
240 return { 240 return {
241 CookieTreeNode: CookieTreeNode, 241 CookieTreeNode: CookieTreeNode,
242 }; 242 };
243 }); 243 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698