| Index: chrome/browser/resources/ntp_android/ntp_android.js
|
| diff --git a/chrome/browser/resources/ntp_android/ntp_android.js b/chrome/browser/resources/ntp_android/ntp_android.js
|
| index ad62da041f40a9ee09e7da6ae4773ab1205ab1a2..535f1984a64540674c06a7381ac5950f3854c826 100644
|
| --- a/chrome/browser/resources/ntp_android/ntp_android.js
|
| +++ b/chrome/browser/resources/ntp_android/ntp_android.js
|
| @@ -943,11 +943,17 @@ cr.define('ntp', function() {
|
| data.splice(8, data.length - 8);
|
| }
|
|
|
| + data.forEach(function(item, index) {
|
| + item.mostVisitedIndex = index;
|
| + });
|
| +
|
| if (equals(data, mostVisitedData_))
|
| return;
|
|
|
| var clickFunction = function(item) {
|
| chrome.send('openedMostVisited');
|
| + chrome.send('metricsHandler:recordInHistogram',
|
| + ['NewTabPage.MostVisited', item.mostVisitedIndex, 8]);
|
| window.location = item.url;
|
| };
|
| populateData(findList('most_visited'), SectionType.MOST_VISITED, data,
|
| @@ -1204,6 +1210,12 @@ cr.define('ntp', function() {
|
| case ContextMenuItemIds.MOST_VISITED_OPEN_IN_NEW_TAB:
|
| case ContextMenuItemIds.MOST_VISITED_OPEN_IN_INCOGNITO_TAB:
|
| chrome.send('openedMostVisited');
|
| + if (contextMenuItem) {
|
| + chrome.send('metricsHandler:recordInHistogram',
|
| + ['NewTabPage.MostVisited',
|
| + contextMenuItem.mostVisitedIndex,
|
| + 8]);
|
| + }
|
| break;
|
|
|
| case ContextMenuItemIds.RECENTLY_CLOSED_OPEN_IN_NEW_TAB:
|
|
|