Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'site-data-details-dialog' provides a dialog to show details of site data | 7 * 'site-data-details-dialog' provides a dialog to show details of site data |
| 8 * stored by a given site. | 8 * stored by a given site. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * Add the cookie data to the content section of this dialog. | 122 * Add the cookie data to the content section of this dialog. |
| 123 * @param {string} id The id of the cookie node to display. | 123 * @param {string} id The id of the cookie node to display. |
| 124 * @param {!settings.CookieTreeNode} site The current site. | 124 * @param {!settings.CookieTreeNode} site The current site. |
| 125 * @private | 125 * @private |
| 126 */ | 126 */ |
| 127 populateItem_: function(id, site) { | 127 populateItem_: function(id, site) { |
| 128 var node = site.fetchNodeById(id, true); | 128 var node = site.fetchNodeById(id, true); |
| 129 if (node) | 129 if (node) |
| 130 this.cookieNodes_ = site.getCookieData(node); | 130 this.cookieNodes_ = getCookieData(node.data_); |
|
Dan Beam
2016/10/27 01:31:55
why is this accessing a private member?
dschuyler
2016/10/27 20:47:35
I'd like to refactor the way the node data is fetc
| |
| 131 }, | 131 }, |
| 132 | 132 |
| 133 /** | 133 /** |
| 134 * Called when a single item has been removed. | 134 * Called when a single item has been removed. |
| 135 * @param {!CookieRemovePacket} args The details about what to remove. | 135 * @param {!CookieRemovePacket} args The details about what to remove. |
| 136 * @private | 136 * @private |
| 137 */ | 137 */ |
| 138 onTreeItemRemoved_: function(args) { | 138 onTreeItemRemoved_: function(args) { |
| 139 this.entries_ = this.site_.getCookieList(); | 139 this.entries_ = this.site_.getCookieList(); |
| 140 if (this.site_.children_.length == 0 || this.entries_.length == 0) { | 140 if (this.site_.children_.length == 0 || this.entries_.length == 0) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 cr.removeWebUIListener(this.listener_); | 194 cr.removeWebUIListener(this.listener_); |
| 195 this.browserProxy.removeCookie(this.site_.data_.id); | 195 this.browserProxy.removeCookie(this.site_.data_.id); |
| 196 this.close(); | 196 this.close(); |
| 197 }, | 197 }, |
| 198 | 198 |
| 199 /** @private */ | 199 /** @private */ |
| 200 onCancelTap_: function() { | 200 onCancelTap_: function() { |
| 201 this.$.dialog.cancel(); | 201 this.$.dialog.cancel(); |
| 202 }, | 202 }, |
| 203 }); | 203 }); |
| OLD | NEW |