diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-08 01:07:06 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-08 01:07:06 +0000 |
commit | 81966946aa4e8861a5200f20b43f177ef70c3478 (patch) | |
tree | 428aee78a0398eeab5a2db173fc90111d3bd84ff /chrome/browser/resources/ntp/most_visited.js | |
parent | 466a92233d4fd084e5e272b3e2af91b19e7b7edc (diff) | |
download | chromium_src-81966946aa4e8861a5200f20b43f177ef70c3478.zip chromium_src-81966946aa4e8861a5200f20b43f177ef70c3478.tar.gz chromium_src-81966946aa4e8861a5200f20b43f177ef70c3478.tar.bz2 |
NTP: Add back the user metrics for navigating to a page through most visited.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/2737001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/most_visited.js')
-rw-r--r-- | chrome/browser/resources/ntp/most_visited.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/resources/ntp/most_visited.js b/chrome/browser/resources/ntp/most_visited.js index fbdffb4..14f23bc 100644 --- a/chrome/browser/resources/ntp/most_visited.js +++ b/chrome/browser/resources/ntp/most_visited.js @@ -456,7 +456,8 @@ var MostVisited = (function() { item.style.zIndex = 2; }, - // We listen to mousedown to get the relative position of the cursor for dnd. + // We listen to mousedown to get the relative position of the cursor for + // dnd. handleMouseDown_: function(e) { var item = getItem(e.target); if (item) { @@ -561,6 +562,14 @@ var MostVisited = (function() { } else if (target.classList.contains('remove')) { this.blacklist(getItem(target)); e.preventDefault(); + } else { + var item = getItem(target); + if (item) { + var index = Array.prototype.indexOf.call(item.parentNode.children, + item); + if (index != -1) + chrome.send('metrics', ['NTP_MostVisited' + index]); + } } }, |