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

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: 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/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..e3fc5d30c7d1d637e03c1fd49c731b023d721913 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.addItemIndexes();
+ },
+
+ addItemIndexes: 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