Index: chrome/browser/resources/md_history/history_list_behavior.js |
diff --git a/chrome/browser/resources/md_history/history_list_behavior.js b/chrome/browser/resources/md_history/history_list_behavior.js |
index 230139f0f6593d0a306ad753f864088a55f16d7a..511c76d68faca7e7a7ba0bb8db2805a986506237 100644 |
--- a/chrome/browser/resources/md_history/history_list_behavior.js |
+++ b/chrome/browser/resources/md_history/history_list_behavior.js |
@@ -94,6 +94,7 @@ var HistoryListBehavior = { |
.then(function() { |
this.removeItemsByPath(Array.from(this.selectedPaths)); |
this.fire('unselect-all'); |
+ this.refreshItemIndexes(); |
}.bind(this)); |
}, |
@@ -164,7 +165,7 @@ var HistoryListBehavior = { |
node.indexes.sort(function(a, b) { return b - a; }); |
node.indexes.forEach(function(index) { |
if (node.leaf || this.removeItemsBeneathNode_(node.children[index])) { |
- var item = array.splice(index, 1); |
+ var item = array.splice(index, 1)[0]; |
splices.push({ |
index: index, |
removed: [item], |
@@ -172,6 +173,19 @@ var HistoryListBehavior = { |
object: array, |
type: 'splice' |
}); |
+ |
+ if (item.index == undefined) |
+ return; |
+ |
+ var browserService = md_history.BrowserService.getInstance(); |
+ browserService.recordHistogram( |
+ 'HistoryPage.RemoveEntryPosition', item.index, |
+ UMA_MAX_BUCKET_VALUE); |
+ if (item.index <= UMA_MAX_SUBSET_BUCKET_VALUE) { |
+ browserService.recordHistogram( |
+ 'HistoryPage.RemoveEntryPositionSubset', item.index, |
+ UMA_MAX_SUBSET_BUCKET_VALUE); |
+ } |
} |
}.bind(this)); |