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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_data_details_subpage.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 | « chrome/browser/resources/settings/site_settings/site_data_details_subpage.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * 'site-data-details-subpage' Display cookie contents. 9 * 'site-data-details-subpage' Display cookie contents.
10 */ 10 */
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 /** 66 /**
67 * settings.RouteObserverBehavior 67 * settings.RouteObserverBehavior
68 * @private 68 * @private
69 */ 69 */
70 onCookiesLoaded_: function() { 70 onCookiesLoaded_: function() {
71 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_); 71 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_);
72 if (node) { 72 if (node) {
73 this.site_ = node; 73 this.site_ = node;
74 this.entries_ = this.site_.getCookieList(); 74 this.entries_ = this.site_.getCookieList();
75 // Set up flag for expanding cookie details.
76 this.entries_.map(function(e) { return e.expanded_ = false; });
75 } else { 77 } else {
76 this.entries_ = []; 78 this.entries_ = [];
77 } 79 }
78 }, 80 },
79 81
80 /** 82 /**
81 * Recursively look up a node path for a leaf node with a given id. 83 * Recursively look up a node path for a leaf node with a given id.
82 * @param {!settings.CookieTreeNode} node The node to start with. 84 * @param {!settings.CookieTreeNode} node The node to start with.
83 * @param {string} currentPath The path constructed so far. 85 * @param {string} currentPath The path constructed so far.
84 * @param {string} targetId The id of the target leaf node to look for. 86 * @param {string} targetId The id of the target leaf node to look for.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 128
127 /** 129 /**
128 * A handler for when the user opts to remove all cookies. 130 * A handler for when the user opts to remove all cookies.
129 */ 131 */
130 removeAll: function() { 132 removeAll: function() {
131 this.browserProxy.removeCookie(this.site_.data.id); 133 this.browserProxy.removeCookie(this.site_.data.id);
132 }, 134 },
133 }); 135 });
134 136
135 })(); 137 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_data_details_subpage.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698