Commit 7b4e2c97 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI Tab Strip: Add metrics for New Tab button inside the tab strip

Bug: 1032778
Change-Id: I7701cdfe36f29110d1da957d87605ddbbc8b9179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013912Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734129}
parent 3e49c929
......@@ -131,8 +131,12 @@ class TabStripModel : public TabGroupController {
// WebUI touch-optimized tab strip.
NEW_TAB_BUTTON_IN_TOOLBAR_FOR_TOUCH = 3,
// New tab was opened through the new tab button inside of the WebUI tab
// strip.
NEW_TAB_BUTTON_IN_WEBUI_TAB_STRIP = 4,
// Number of enum entries, used for UMA histogram reporting macros.
NEW_TAB_ENUM_COUNT = 4,
NEW_TAB_ENUM_COUNT = 5,
};
static constexpr int kNoTab = -1;
......
......@@ -411,6 +411,9 @@ void TabStripUIHandler::RegisterMessages() {
}
void TabStripUIHandler::HandleCreateNewTab(const base::ListValue* args) {
UMA_HISTOGRAM_ENUMERATION("Tab.NewTab",
TabStripModel::NEW_TAB_BUTTON_IN_WEBUI_TAB_STRIP,
TabStripModel::NEW_TAB_ENUM_COUNT);
chrome::ExecuteCommand(browser_, IDC_NEW_TAB);
}
......
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