Chromium Code Reviews| Index: chrome/browser/resources/md_history/list_container.js |
| diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js |
| index 76cb2f5e1c83e3d5793157e4072a9bf2ce4ad373..917d35b52f067c9aabd00d0cb1538d4259bafdbe 100644 |
| --- a/chrome/browser/resources/md_history/list_container.js |
| +++ b/chrome/browser/resources/md_history/list_container.js |
| @@ -83,9 +83,14 @@ Polymer({ |
| .unselectAllItems(count); |
| }, |
| + /** |
| + * Delete all the currently selected history items. Will prompt the user with |
| + * a dialog to confirm that the deletion should be performed. |
| + */ |
| deleteSelected: function() { |
|
calamity
2016/07/08 06:05:50
promptDeleteSelected perhaps? promptDeletion?
I j
tsergeant
2016/07/08 06:37:27
Done.
|
| - /** @type {HistoryListElement} */ (this.$['infinite-list']) |
| - .deleteSelected(); |
| + if (!loadTimeData.getBoolean('allowDeletingHistory')) |
| + return; |
|
calamity
2016/07/08 06:05:50
nit: newline here.
tsergeant
2016/07/08 06:37:27
Done.
|
| + this.$.dialog.open(); |
| }, |
| /** |
| @@ -131,4 +136,15 @@ Polymer({ |
| } |
| } |
| }, |
| + |
| + /** @private */ |
| + onDialogConfirmTap_: function() { |
| + this.$['infinite-list'].deleteSelected(); |
| + this.$.dialog.close(); |
| + }, |
| + |
| + /** @private */ |
| + onDialogCancelTap_: function() { |
| + this.$.dialog.close(); |
| + } |
| }); |