Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: chrome/browser/resources/md_history/list_container.js

Issue 2246033002: [MD History] Fix the 'Remove from history' button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shift_select
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6cc6518d31bd4c0f1d2988c936e23d6967f80f10..a0ba4c3e9fb728b37f70b37881a03b2f47aad837 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -166,23 +166,24 @@ Polymer({
toggleMenu_: function(e) {
var target = e.detail.target;
/** @type {CrSharedMenuElement} */(this.$.sharedMenu).toggleMenu(
- target, e.detail.item);
+ target, e.detail);
},
/** @private */
onMoreFromSiteTap_: function() {
var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
- this.fire('search-domain', {domain: menu.itemData.domain});
+ this.fire('search-domain', {domain: menu.itemData.item.domain});
menu.closeMenu();
},
/** @private */
onRemoveFromHistoryTap_: function() {
var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu);
+ var itemData = menu.itemData;
md_history.BrowserService.getInstance()
- .deleteItems([menu.itemData])
+ .deleteItems([itemData.item])
.then(function(items) {
- this.getSelectedList_().removeItemsByPath(items[0].path);
+ this.getSelectedList_().removeItemsByPath([itemData.path]);
// This unselect-all is to reset the toolbar when deleting a selected
// item. TODO(tsergeant): Make this automatic based on observing list
// modifications.
« no previous file with comments | « chrome/browser/resources/md_history/history_item.js ('k') | chrome/test/data/webui/md_history/history_list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698