Skip to content

Commit

Permalink
Add user action metric for "New Incognito Window" accelerator.
Browse files Browse the repository at this point in the history
Accel_NewIncognitoWindow is added to record usage of CMD+Shift+N to open
a new Incognito window.

Bug: 1229939
Change-Id: Ife48e403c1415a39a2dcc9c0e887a8c791ead2e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3034607
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#903022}
  • Loading branch information
Ramin Halavati authored and Chromium LUCI CQ committed Jul 19, 2021
1 parent f5c6299 commit 5ab5733
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chrome/browser/ui/views/frame/browser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3506,6 +3506,10 @@ void BrowserView::UpdateAcceleratorMetrics(const ui::Accelerator& accelerator,
base::RecordAction(base::UserMetricsAction("Accel_NewTabInGroup"));
}

if (command_id == IDC_NEW_INCOGNITO_WINDOW) {
base::RecordAction(base::UserMetricsAction("Accel_NewIncognitoWindow"));
}

#if BUILDFLAG(IS_CHROMEOS_ASH)
// Collect information about the relative popularity of various accelerators
// on Chrome OS.
Expand Down
8 changes: 8 additions & 0 deletions tools/metrics/actions/actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,14 @@ should be able to be added at any place in this file.
<description>Please enter the description of this user action.</description>
</action>

<action name="Accel_NewIncognitoWindow">
<owner>rhalavati@chromium.org</owner>
<owner>chrome-incognito@google.com</owner>
<description>
User pressed CMD+Shift+N to open a new Incognito window.
</description>
</action>

<action name="Accel_NewTab_T">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
Expand Down

0 comments on commit 5ab5733

Please sign in to comment.