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

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 with master 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_data_details_subpage.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 var node = id == null ? this : this.fetchNodeById(id, true); 127 var node = id == null ? this : this.fetchNodeById(id, true);
128 node.children_.splice(firstChild, count); 128 node.children_.splice(firstChild, count);
129 }, 129 },
130 130
131 /** 131 /**
132 * Returns an array of cookies from the current node within the cookie tree. 132 * Returns an array of cookies from the current node within the cookie tree.
133 * @return {!Array<!CookieDataItem>} The Cookie List. 133 * @return {!Array<!CookieDataItem>} The Cookie List.
134 */ 134 */
135 getCookieList: function() { 135 getCookieList: function() {
136 var list = []; 136 var list = [];
137 137 for (var child of this.children_) {
138 for (var group of this.children_) { 138 for (var cookie of child.children_) {
139 for (var cookie of group.children_) {
140 list.push({title: cookie.data.title, 139 list.push({title: cookie.data.title,
141 id: cookie.data.id, 140 id: cookie.data.id,
142 data: cookie.data}); 141 data: cookie.data});
143 } 142 }
144 } 143 }
145 144
146 return list; 145 return list;
147 }, 146 },
148 147
149 /** 148 /**
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return this.children_[i]; 224 return this.children_[i];
226 } 225 }
227 return null; 226 return null;
228 }, 227 },
229 }; 228 };
230 229
231 return { 230 return {
232 CookieTreeNode: CookieTreeNode, 231 CookieTreeNode: CookieTreeNode,
233 }; 232 };
234 }); 233 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_data_details_subpage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698