Commit 5ea4c08e authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[NTP] Log links opened via the context menu on the NTP.

Log links opened from the Most Visited iframe (shortcuts) in
MostVisited_Clicked. Log links open from elsewhere on the local NTP
in NTP_LinkOpenedFromContextMenu.

Bug: 951892, 961477
Change-Id: I961963c3f97d830dbe4ed3e6eaeb1459337bc3af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640608
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668530}
parent 0513eb42
......@@ -979,6 +979,12 @@ void RenderViewContextMenu::RecordUsedItem(int id) {
} else if (doc_url == GURL(chrome::kChromeUIDownloadsURL)) {
base::RecordAction(base::UserMetricsAction(
"Downloads_OpenUrlOfDownloadedItemFromContextMenu"));
} else if (doc_url == GURL(chrome::kChromeSearchLocalNtpUrl)) {
base::RecordAction(
base::UserMetricsAction("NTP_LinkOpenedFromContextMenu"));
} else if (doc_url.GetOrigin() == chrome::kChromeSearchMostVisitedUrl) {
base::RecordAction(
base::UserMetricsAction("MostVisited_ClickedFromContextMenu"));
}
}
......
......@@ -13138,6 +13138,14 @@ should be able to be added at any place in this file.
<description>An NTP tile was clicked. Desktop only.</description>
</action>
<action name="MostVisited_ClickedFromContextMenu">
<owner>dbeam@chromium.org</owner>
<owner>kristipark@chromium.org</owner>
<description>
An NTP tile was opened from the context menu. Desktop only.
</description>
</action>
<action name="MostVisited_UrlBlacklisted">
<owner>sfiera@chromium.org</owner>
<owner>treib@chromium.org</owner>
......@@ -13510,6 +13518,18 @@ should be able to be added at any place in this file.
<description>Recorded when the NPAPI removal infobar is shown.</description>
</action>
<action name="NTP_LinkOpenedFromContextMenu">
<owner>kmilka@chromium.org</owner>
<owner>ramyan@chromium.org</owner>
<description>
Recorded when a link on the New Tab Page is opened via the context menu.
This can include: Middle-slot promos, Doodles, the One Google Bar, and
custom background image attributions, but *not* shortcuts. For shortcuts see
MostVisited_Clicked. Logged only when Google is the default search provider,
as these elements only appear on the Google NTP.
</description>
</action>
<action name="NTPPromoClosed">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<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