Commit 4a20a895 authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS] Adds metrics to action sheet

This CL adds the following user actions:
- MobileTabGridCloseAllTabsConfirmationConfirmed
- MobileTabGridCloseAllRegularTabsConfirmationPresented
- MobileTabGridCloseAllIncognitoTabsConfirmationPresented
- MobileTabGridCloseAllTabsConfirmationCanceled

Bug: 1119319
Change-Id: Ifebaca830bcf52e0c526a32acb90b82d376db33b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367094Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803480}
parent 94f715a1
......@@ -397,6 +397,14 @@
(TabGridMediator*)tabGridMediator
numberOfTabs:
(NSInteger)numberOfTabs {
if (tabGridMediator == self.regularTabsMediator) {
base::RecordAction(base::UserMetricsAction(
"MobileTabGridCloseAllRegularTabsConfirmationPresented"));
} else {
base::RecordAction(base::UserMetricsAction(
"MobileTabGridCloseAllIncognitoTabsConfirmationPresented"));
}
self.actionSheetCoordinator = [[ActionSheetCoordinator alloc]
initWithBaseViewController:self.baseViewController
browser:self.browser
......@@ -413,12 +421,16 @@
[self.actionSheetCoordinator
addItemWithTitle:l10n_util::GetNSString(IDS_IOS_TAB_GRID_CLOSE_ALL_BUTTON)
action:^{
base::RecordAction(base::UserMetricsAction(
"MobileTabGridCloseAllTabsConfirmationConfirmed"));
[tabGridMediator closeAllItems];
}
style:UIAlertActionStyleDestructive];
[self.actionSheetCoordinator
addItemWithTitle:l10n_util::GetNSString(IDS_CANCEL)
action:^{
base::RecordAction(base::UserMetricsAction(
"MobileTabGridCloseAllTabsConfirmationCanceled"));
}
style:UIAlertActionStyleCancel];
[self.actionSheetCoordinator start];
......
......@@ -15010,6 +15010,15 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="MobileTabGridCloseAllIncognitoTabsConfirmationPresented">
<owner>ewannpv@chromium.org</owner>
<owner>marq@chromium.org</owner>
<description>
User in the iOS incognito tab grid used the Close All control and the action
sheet that asks for confirmation has been displayed.
</description>
</action>
<action name="MobileTabGridCloseAllRegularTabs">
<owner>edchin@chromium.org</owner>
<owner>marq@chromium.org</owner>
......@@ -15019,6 +15028,33 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="MobileTabGridCloseAllRegularTabsConfirmationPresented">
<owner>ewannpv@chromium.org</owner>
<owner>marq@chromium.org</owner>
<description>
User in the iOS regular tab grid used the Close All control and the action
sheet that asks for confirmation has been displayed.
</description>
</action>
<action name="MobileTabGridCloseAllTabsConfirmationCanceled">
<owner>ewannpv@chromium.org</owner>
<owner>marq@chromium.org</owner>
<description>
User in the iOS tab grid used the Close All control and the action sheet
that asks for confirmation has been Canceled.
</description>
</action>
<action name="MobileTabGridCloseAllTabsConfirmationConfirmed">
<owner>ewannpv@chromium.org</owner>
<owner>marq@chromium.org</owner>
<description>
User in the iOS tab grid used the Close All control and the action sheet
that asks for confirmation has been Confirmed.
</description>
</action>
<action name="MobileTabGridCloseControlTapped">
<owner>edchin@chromium.org</owner>
<owner>marq@chromium.org</owner>
......
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