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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 break; | 164 break; |
165 } | 165 } |
166 } | 166 } |
167 }, | 167 }, |
168 | 168 |
169 getEntryDescription: function(item) { | 169 getEntryDescription: function(item) { |
170 // Frequently there are multiple cookies per site. To avoid showing a list | 170 // Frequently there are multiple cookies per site. To avoid showing a list |
171 // of '1 cookie', '1 cookie', ... etc, it is better to show the title of the | 171 // of '1 cookie', '1 cookie', ... etc, it is better to show the title of the |
172 // cookie to differentiate them. | 172 // cookie to differentiate them. |
173 if (item.data.type == 'cookie') | 173 if (item.data.type == 'cookie') |
174 return item.title; | 174 return loadTimeData.getStringF('siteSettingsCookie', item.title); |
175 | 175 |
176 return getCookieDataCategoryText(item.data.type, item.data.totalUsage); | 176 return getCookieDataCategoryText(item.data.type, item.data.totalUsage); |
177 }, | 177 }, |
178 | 178 |
179 /** | 179 /** |
180 * A handler for when the user opts to remove a single cookie. | 180 * A handler for when the user opts to remove a single cookie. |
181 * @private | 181 * @private |
182 */ | 182 */ |
183 onRemove_: function(event) { | 183 onRemove_: function(event) { |
184 this.browserProxy.removeCookie(this.nodePath_( | 184 this.browserProxy.removeCookie(this.nodePath_( |
185 this.site_, this.site_.data_.id, this.$.picker.selected)); | 185 this.site_, this.site_.data_.id, this.$.picker.selected)); |
186 }, | 186 }, |
187 | 187 |
188 /** | 188 /** |
189 * A handler for when the user opts to remove all cookies. | 189 * A handler for when the user opts to remove all cookies. |
190 * @private | 190 * @private |
191 */ | 191 */ |
192 onRemoveAll_: function(event) { | 192 onRemoveAll_: function(event) { |
193 cr.removeWebUIListener(this.listener_); | 193 cr.removeWebUIListener(this.listener_); |
194 this.browserProxy.removeCookie(this.site_.data_.id); | 194 this.browserProxy.removeCookie(this.site_.data_.id); |
195 this.close(); | 195 this.close(); |
196 }, | 196 }, |
197 | 197 |
198 /** @private */ | 198 /** @private */ |
199 onCancelTap_: function() { | 199 onCancelTap_: function() { |
200 this.$.dialog.cancel(); | 200 this.$.dialog.cancel(); |
201 }, | 201 }, |
202 }); | 202 }); |
OLD | NEW |