| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 * @implements {SDK.TargetManager.Observer} | 5 * @implements {SDK.TargetManager.Observer} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Resources.ClearStorageView = class extends UI.VBox { | 8 Resources.ClearStorageView = class extends UI.VBox { |
| 9 /** | 9 /** |
| 10 * @param {!Resources.ResourcesPanel} resourcesPanel | 10 * @param {!Resources.ResourcesPanel} resourcesPanel |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 model.clearForOrigin(this._securityOrigin); | 142 model.clearForOrigin(this._securityOrigin); |
| 143 } | 143 } |
| 144 | 144 |
| 145 if (set.has(Protocol.Storage.StorageType.Appcache) || hasAll) { | 145 if (set.has(Protocol.Storage.StorageType.Appcache) || hasAll) { |
| 146 var appcacheModel = Resources.ApplicationCacheModel.fromTarget(this._targe
t); | 146 var appcacheModel = Resources.ApplicationCacheModel.fromTarget(this._targe
t); |
| 147 if (appcacheModel) | 147 if (appcacheModel) |
| 148 appcacheModel.reset(); | 148 appcacheModel.reset(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 this._clearButton.disabled = true; | 151 this._clearButton.disabled = true; |
| 152 var label = this._clearButton.textContent; |
| 152 this._clearButton.textContent = Common.UIString('Clearing...'); | 153 this._clearButton.textContent = Common.UIString('Clearing...'); |
| 153 setTimeout(() => { | 154 setTimeout(() => { |
| 154 this._clearButton.disabled = false; | 155 this._clearButton.disabled = false; |
| 155 this._clearButton.textContent = Common.UIString('Clear selected'); | 156 this._clearButton.textContent = label; |
| 156 }, 500); | 157 }, 500); |
| 157 } | 158 } |
| 158 }; | 159 }; |
| OLD | NEW |