Commit ccfa14da authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Download: Add metric for URL clicks in chrome://downloads.

This CL adds a metrics for click events on the URL in chrome://downloads
for Chromenav.

Bug: 957346
Change-Id: I7460f5c2268c375b32c7fbede050c194a57f3fcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1601691Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Reviewed-by: default avatarcalamity <calamity@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarDan Beam <dbeam@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658796}
parent fb936ad7
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
data.fileExternallyRemoved)]]</span> data.fileExternallyRemoved)]]</span>
</div> </div>
<a id="url" target="_blank" focus-row-control <a id="url" target="_blank" on-click="onUrlTap_" focus-row-control
focus-type="url">[[chopUrl_(data.url)]]</a> focus-type="url">[[chopUrl_(data.url)]]</a>
<div id="description">[[computeDescription_( <div id="description">[[computeDescription_(
......
...@@ -441,6 +441,12 @@ cr.define('downloads', function() { ...@@ -441,6 +441,12 @@ cr.define('downloads', function() {
this.mojoHandler_.openFileRequiringGesture(this.data.id); this.mojoHandler_.openFileRequiringGesture(this.data.id);
}, },
/** @private */
onUrlTap_: function() {
chrome.send('metricsHandler:recordAction',
['Downloads_OpenUrlOfDownloadedItem']);
},
/** @private */ /** @private */
onPauseOrResumeTap_: function() { onPauseOrResumeTap_: function() {
if (this.isInProgress_) { if (this.isInProgress_) {
......
...@@ -5346,6 +5346,13 @@ should be able to be added at any place in this file. ...@@ -5346,6 +5346,13 @@ should be able to be added at any place in this file.
</description> </description>
</action> </action>
<action name="Downloads_OpenUrlOfDownloadedItem">
<owner>xingliu@chromium.org</owner>
<description>
Records clicks on the URL of download items in chrome://downloads page.
</description>
</action>
<action name="Duplicate"> <action name="Duplicate">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner> <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description> <description>Please enter the description of this user action.</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment