Commit 3f44738a authored by Eugene But's avatar Eugene But Committed by Commit Bot

Improve user actions logging for closing the Tab.

Add OverscrollActionCloseTab user action.
Mark MobileTabClosed as not_user_triggered.

This will help to better distinguish different ways
of closing the tab.

Bug: 1046223
Change-Id: I58ce36f51bb39f4d52e75633c2c6840ce4283b2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032405
Auto-Submit: Eugene But <eugenebut@chromium.org>
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738693}
parent 79cfcab1
......@@ -5,6 +5,8 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h"
#include "base/mac/foundation_util.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "components/ntp_snippets/content_suggestions_service.h"
#include "components/ntp_snippets/pref_names.h"
#include "components/ntp_snippets/remote/remote_suggestions_scheduler.h"
......@@ -224,6 +226,7 @@
} break;
case OverscrollAction::CLOSE_TAB: {
[_dispatcher closeCurrentTab];
base::RecordAction(base::UserMetricsAction("OverscrollActionCloseTab"));
} break;
case OverscrollAction::REFRESH:
[self reload];
......
......@@ -13650,7 +13650,7 @@ 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="MobileTabClosed">
<action name="MobileTabClosed" not_user_triggered="true">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
</action>
......@@ -17094,6 +17094,14 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="OverscrollActionCloseTab">
<owner>eugenebut@chromium.org</owner>
<owner>kkhorimoto@chromium.org</owner>
<description>
Called when the user closes the tab using overscroll action.
</description>
</action>
<action name="PageDown">
<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