| Index: chrome/browser/resources/history/other_devices.js
|
| diff --git a/chrome/browser/resources/history/other_devices.js b/chrome/browser/resources/history/other_devices.js
|
| index c69f68222b0f43dc5ee21f30ce0f62e34d5f7d39..cc362b499b7c41b2894b75af7c8d7e19d337f172 100644
|
| --- a/chrome/browser/resources/history/other_devices.js
|
| +++ b/chrome/browser/resources/history/other_devices.js
|
| @@ -67,9 +67,10 @@ DeviceContextMenuController.prototype.initialize = function() {
|
| this.expandItem_ = this.appendMenuItem_('expandSessionMenuItemText');
|
| this.expandItem_.addEventListener('activate',
|
| this.onCollapseOrExpand_.bind(this));
|
| - this.openAllItem_ = this.appendMenuItem_('restoreSessionMenuItemText');
|
| - this.openAllItem_.addEventListener('activate',
|
| - this.onOpenAll_.bind(this));
|
| + var openAllItem = this.appendMenuItem_('restoreSessionMenuItemText');
|
| + openAllItem.addEventListener('activate', this.onOpenAll_.bind(this));
|
| + var deleteItem = this.appendMenuItem_('deleteSessionMenuItemText');
|
| + deleteItem.addEventListener('activate', this.onDeleteSession_.bind(this));
|
| };
|
|
|
| /**
|
| @@ -127,6 +128,16 @@ DeviceContextMenuController.prototype.onOpenAll_ = function(e) {
|
| };
|
|
|
| /**
|
| + * Handler for the 'Hide for now' menu item.
|
| + * @param {Event} e The activation event.
|
| + * @private
|
| + */
|
| +DeviceContextMenuController.prototype.onDeleteSession_ = function(e) {
|
| + chrome.send('deleteForeignSession', [this.session_.tag]);
|
| + recordUmaEvent_(HISTOGRAM_EVENT.HIDE_FOR_NOW);
|
| +};
|
| +
|
| +/**
|
| * Set the visibility of the Expand/Collapse menu items based on the state
|
| * of the session that this menu is currently associated with.
|
| * @private
|
|
|