Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 | 72 |
| 73 /** | 73 /** |
| 74 * settings.RouteObserverBehavior | 74 * settings.RouteObserverBehavior |
| 75 * @private | 75 * @private |
| 76 */ | 76 */ |
| 77 onCookiesLoaded_: function() { | 77 onCookiesLoaded_: function() { |
| 78 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_, false); | 78 var node = this.rootCookieNode.fetchNodeBySite(this.siteTitle_, false); |
| 79 if (node) { | 79 if (node) { |
| 80 this.site_ = node; | 80 this.site_ = node; |
| 81 this.entries_ = this.site_.getCookieList(); | 81 this.entries_ = this.site_.getCookieList(); |
| 82 // Setup flag for expanding cookie details. | |
|
Dan Beam
2016/10/27 23:37:15
Set up
dschuyler
2016/11/02 21:19:33
Done.
| |
| 83 this.entries_.map(function(x) { return x.expanded_ = false; }); | |
|
Dan Beam
2016/10/27 23:37:15
why x instead of like e?
dschuyler
2016/11/02 21:19:33
Done.
| |
| 82 } else { | 84 } else { |
| 83 this.entries_ = []; | 85 this.entries_ = []; |
| 84 } | 86 } |
| 85 }, | 87 }, |
| 86 | 88 |
| 87 /** | 89 /** |
| 88 * Recursively look up a node path for a leaf node with a given id. | 90 * Recursively look up a node path for a leaf node with a given id. |
| 89 * @param {!settings.CookieTreeNode} node The node to start with. | 91 * @param {!settings.CookieTreeNode} node The node to start with. |
| 90 * @param {string} currentPath The path constructed so far. | 92 * @param {string} currentPath The path constructed so far. |
| 91 * @param {string} targetId The id of the target leaf node to look for. | 93 * @param {string} targetId The id of the target leaf node to look for. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 * A handler for when the user opts to remove all cookies. | 137 * A handler for when the user opts to remove all cookies. |
| 136 * @param {!Event} event | 138 * @param {!Event} event |
| 137 * @private | 139 * @private |
| 138 */ | 140 */ |
| 139 onRemoveAll_: function(event) { | 141 onRemoveAll_: function(event) { |
| 140 this.browserProxy.removeCookie(this.site_.data_.id); | 142 this.browserProxy.removeCookie(this.site_.data_.id); |
| 141 }, | 143 }, |
| 142 }); | 144 }); |
| 143 | 145 |
| 144 })(); | 146 })(); |
| OLD | NEW |