| 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'site-details' show the details (permissions and usage) for a given origin | 7 * 'site-details' show the details (permissions and usage) for a given origin |
| 8 * under Site Settings. | 8 * under Site Settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 this.$.usageApi.fetchUsageTotal(this.toUrl(origin).hostname); | 76 this.$.usageApi.fetchUsageTotal(this.toUrl(origin).hostname); |
| 77 }, | 77 }, |
| 78 | 78 |
| 79 /** @private */ | 79 /** @private */ |
| 80 onCloseDialog_: function() { | 80 onCloseDialog_: function() { |
| 81 this.$.confirmDeleteDialog.close(); | 81 this.$.confirmDeleteDialog.close(); |
| 82 }, | 82 }, |
| 83 | 83 |
| 84 /** | 84 /** |
| 85 * Confirms the deletion of storage for a site. | 85 * Confirms the deletion of storage for a site. |
| 86 * @param {!Event} e |
| 86 * @private | 87 * @private |
| 87 */ | 88 */ |
| 88 onConfirmClearStorage_: function() { | 89 onConfirmClearStorage_: function(e) { |
| 90 e.preventDefault(); |
| 89 this.confirmationDeleteMsg_ = loadTimeData.getStringF( | 91 this.confirmationDeleteMsg_ = loadTimeData.getStringF( |
| 90 'siteSettingsSiteRemoveConfirmation', | 92 'siteSettingsSiteRemoveConfirmation', |
| 91 this.toUrl(this.site.origin).href); | 93 this.toUrl(this.site.origin).href); |
| 92 this.$.confirmDeleteDialog.showModal(); | 94 this.$.confirmDeleteDialog.showModal(); |
| 93 }, | 95 }, |
| 94 | 96 |
| 95 /** | 97 /** |
| 96 * Clears all data stored for the current origin. | 98 * Clears all data stored for the current origin. |
| 97 * @private | 99 * @private |
| 98 */ | 100 */ |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 /** | 142 /** |
| 141 * Returns true if one or more permission is showing. | 143 * Returns true if one or more permission is showing. |
| 142 * @private | 144 * @private |
| 143 */ | 145 */ |
| 144 permissionShowing_: function() { | 146 permissionShowing_: function() { |
| 145 return Array.prototype.some.call( | 147 return Array.prototype.some.call( |
| 146 this.root.querySelectorAll('site-details-permission'), | 148 this.root.querySelectorAll('site-details-permission'), |
| 147 function(element) { return element.offsetHeight > 0; }); | 149 function(element) { return element.offsetHeight > 0; }); |
| 148 }, | 150 }, |
| 149 }); | 151 }); |
| OLD | NEW |