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

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

Issue 2255033002: [MD History] Copy stats from the old history page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sidebar_stats
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 65d987f228e70672a413c3b01c4a66a85a0a0d9a..092744b7b52f72a973839d365c48c4af7ab5dc04 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -103,6 +103,11 @@ Polymer({
deleteSelectedWithPrompt: function() {
if (!loadTimeData.getBoolean('allowDeletingHistory'))
return;
+
+ var browserService = md_history.BrowserService.getInstance();
+ browserService.recordAction('RemoveSelected');
+ if (this.searchTerm != '')
+ browserService.recordAction('SearchResultRemove');
this.$.dialog.get().then(function(dialog) {
dialog.showModal();
});
@@ -151,6 +156,9 @@ Polymer({
/** @private */
onDialogConfirmTap_: function() {
+ md_history.BrowserService.getInstance().recordAction(
+ 'ConfirmRemoveSelected');
+
this.getSelectedList_().deleteSelected();
var dialog = assert(this.$.dialog.getIfExists());
dialog.close();
@@ -158,6 +166,9 @@ Polymer({
/** @private */
onDialogCancelTap_: function() {
+ md_history.BrowserService.getInstance().recordAction(
+ 'CancelRemoveSelected');
+
var dialog = assert(this.$.dialog.getIfExists());
dialog.close();
},
@@ -189,6 +200,9 @@ Polymer({
/** @private */
onMoreFromSiteTap_: function() {
+ md_history.BrowserService.getInstance().recordAction(
+ 'EntryMenuShowMoreFromSite');
+
var menu = assert(this.$.sharedMenu.getIfExists());
this.fire('search-domain', {domain: menu.itemData.item.domain});
menu.closeMenu();
@@ -196,10 +210,11 @@ Polymer({
/** @private */
onRemoveFromHistoryTap_: function() {
+ var browserService = md_history.BrowserService.getInstance();
+ browserService.recordAction('EntryMenuRemoveFromHistory');
var menu = assert(this.$.sharedMenu.getIfExists());
var itemData = menu.itemData;
- md_history.BrowserService.getInstance()
- .deleteItems([itemData.item])
+ browserService.deleteItems([itemData.item])
.then(function(items) {
this.getSelectedList_().removeItemsByPath([itemData.path]);
// This unselect-all is to reset the toolbar when deleting a selected

Powered by Google App Engine
This is Rietveld 408576698