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

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

Issue 2834433002: MD Settings: ESLint --fix output, WIP. (Closed)
Patch Set: Created 3 years, 8 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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 * The data for this cookie node. 67 * The data for this cookie node.
68 * @type {CookieDetails} 68 * @type {CookieDetails}
69 */ 69 */
70 this.data = data; 70 this.data = data;
71 71
72 /** 72 /**
73 * The child cookie nodes. 73 * The child cookie nodes.
74 * @private {!Array<!settings.CookieTreeNode>} 74 * @private {!Array<!settings.CookieTreeNode>}
75 */ 75 */
76 this.children_ = []; 76 this.children_ = [];
77 }; 77 }
78 78
79 CookieTreeNode.prototype = { 79 CookieTreeNode.prototype = {
80 /** 80 /**
81 * Converts a list of cookies and add them as CookieTreeNode children to 81 * Converts a list of cookies and add them as CookieTreeNode children to
82 * the given parent node. 82 * the given parent node.
83 * @param {!settings.CookieTreeNode} parentNode The parent node to add 83 * @param {!settings.CookieTreeNode} parentNode The parent node to add
84 * children to. 84 * children to.
85 * @param {!Array<!CookieDetails>} newNodes The list containing the data to 85 * @param {!Array<!CookieDetails>} newNodes The list containing the data to
86 * add. 86 * add.
87 */ 87 */
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 for (var i = 0; i < this.children_.length; i++) { 137 for (var i = 0; i < this.children_.length; i++) {
138 var child = this.children_[i]; 138 var child = this.children_[i];
139 for (var j = 0; j < child.children_.length; j++) { 139 for (var j = 0; j < child.children_.length; j++) {
140 var cookie = child.children_[j]; 140 var cookie = child.children_[j];
141 list.push({title: cookie.data.title, 141 list.push({title: cookie.data.title,
142 id: cookie.data.id, 142 id: cookie.data.id,
143 data: cookie.data}); 143 data: cookie.data});
dschuyler 2017/04/19 18:58:41 four space indent
Dan Beam 2017/04/19 19:04:40 well, actually, array and object literals that are
dpapad 2017/04/19 19:19:55 Will tweak config again.
144 } 144 }
145 } 145 }
146 146
147 return list; 147 return list;
148 }, 148 },
149 149
150 /** 150 /**
151 * Get a summary list of all sites and their stored data. 151 * Get a summary list of all sites and their stored data.
152 * @return {!Array<!CookieDataSummaryItem>} The summary list. 152 * @return {!Array<!CookieDataSummaryItem>} The summary list.
153 */ 153 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 return this.children_[i]; 226 return this.children_[i];
227 } 227 }
228 return null; 228 return null;
229 }, 229 },
230 }; 230 };
231 231
232 return { 232 return {
233 CookieTreeNode: CookieTreeNode, 233 CookieTreeNode: CookieTreeNode,
234 }; 234 };
235 }); 235 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698