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

Unified Diff: chrome/browser/resources/md_history/grouped_list.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/grouped_list.js
diff --git a/chrome/browser/resources/md_history/grouped_list.js b/chrome/browser/resources/md_history/grouped_list.js
index f5ca7d0ca8faa65b68e28cd567ef2eafd37b6da4..a4f459087b278ebb3fb2d9c0c191dc5950e5281b 100644
--- a/chrome/browser/resources/md_history/grouped_list.js
+++ b/chrome/browser/resources/md_history/grouped_list.js
@@ -126,6 +126,19 @@ Polymer({
domains: this.createHistoryDomains_(this.historyData)
}];
}
+
+ this.refreshItemIndexes();
+ },
+
+ refreshItemIndexes: function() {
+ var index = 0;
+ this.groupedHistoryData_.forEach(function(group) {
+ group.domains.forEach(function(domain) {
+ domain.visits.forEach(function(visit) {
+ visit.index = index++;
+ });
+ });
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698