| 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 b6c1ba2170396571dd22206fb1e4374e269a86ab..37d66f0bdb76deaa4cee101ae65e7eacd3725b9c 100644
|
| --- a/chrome/browser/resources/md_history/list_container.js
|
| +++ b/chrome/browser/resources/md_history/list_container.js
|
| @@ -255,30 +255,28 @@ Polymer({
|
| browserService.recordAction('EntryMenuRemoveFromHistory');
|
| var menu = assert(this.$.sharedMenu.getIfExists());
|
| var itemData = menu.itemData;
|
| - browserService.deleteItems([itemData.item])
|
| - .then(function(items) {
|
| - // This unselect-all resets the toolbar when deleting a selected item
|
| - // and clears selection state which can be invalid if items move
|
| - // around during deletion.
|
| - // TODO(tsergeant): Make this automatic based on observing list
|
| - // modifications.
|
| - this.fire('unselect-all');
|
| - this.getSelectedList_().removeItemsByPath([itemData.path]);
|
| -
|
| - var index = itemData.index;
|
| - if (index == undefined)
|
| - return;
|
| -
|
| - var browserService = md_history.BrowserService.getInstance();
|
| - browserService.recordHistogram(
|
| - 'HistoryPage.RemoveEntryPosition',
|
| - Math.min(index, UMA_MAX_BUCKET_VALUE), UMA_MAX_BUCKET_VALUE);
|
| - if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) {
|
| - browserService.recordHistogram(
|
| - 'HistoryPage.RemoveEntryPositionSubset', index,
|
| - UMA_MAX_SUBSET_BUCKET_VALUE);
|
| - }
|
| - }.bind(this));
|
| + browserService.deleteItems([itemData.item]).then(items => {
|
| + // This unselect-all resets the toolbar when deleting a selected item and
|
| + // clears selection state which can be invalid if items move around during
|
| + // deletion. TODO(tsergeant): Make this automatic based on observing list
|
| + // modifications.
|
| + this.fire('unselect-all');
|
| + this.getSelectedList_().removeItemsByPath([itemData.path]);
|
| +
|
| + var index = itemData.index;
|
| + if (index == undefined)
|
| + return;
|
| +
|
| + var browserService = md_history.BrowserService.getInstance();
|
| + browserService.recordHistogram(
|
| + 'HistoryPage.RemoveEntryPosition',
|
| + Math.min(index, UMA_MAX_BUCKET_VALUE), UMA_MAX_BUCKET_VALUE);
|
| + if (index <= UMA_MAX_SUBSET_BUCKET_VALUE) {
|
| + browserService.recordHistogram(
|
| + 'HistoryPage.RemoveEntryPositionSubset', index,
|
| + UMA_MAX_SUBSET_BUCKET_VALUE);
|
| + }
|
| + });
|
| menu.closeMenu();
|
| },
|
|
|
|
|