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

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: add_stats 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 b4e348a68351d78023581b87fa98670d52512677..bbaae5997d2f089e2916ab72f3784e120d406478 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -113,6 +113,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();
});
@@ -161,6 +166,9 @@ Polymer({
/** @private */
onDialogConfirmTap_: function() {
+ md_history.BrowserService.getInstance().recordAction(
+ 'ConfirmRemoveSelected');
+
this.getSelectedList_().deleteSelected();
var dialog = assert(this.$.dialog.getIfExists());
dialog.close();
@@ -168,6 +176,9 @@ Polymer({
/** @private */
onDialogCancelTap_: function() {
+ md_history.BrowserService.getInstance().recordAction(
+ 'CancelRemoveSelected');
+
var dialog = assert(this.$.dialog.getIfExists());
dialog.close();
},
@@ -199,6 +210,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();
@@ -206,10 +220,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])
tsergeant 2016/08/22 00:23:40 You'll need to refresh indexes here. This is a bi
calamity 2016/08/23 04:52:25 N/A
.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