Commit 07e2788e authored by jdduke's avatar jdduke Committed by Commit bot

[Android] Add UMA for pull-to-refresh activation

Add a baseline metric for the number of page reloads triggered by the
new pull-to-refresh gesture, allowing comparison with other avenues
for page reload (e.g., from toolbar reload icon).

BUG=442505

Review URL: https://codereview.chromium.org/803343002

Cr-Commit-Position: refs/heads/master@{#308477}
parent 0cdd39fd
......@@ -13,6 +13,7 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/input/did_overscroll_params.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/android/resources/resource_manager.h"
......@@ -277,6 +278,7 @@ void OverscrollControllerAndroid::TriggerRefresh() {
return;
triggered_refresh_active_ = true;
RecordAction(base::UserMetricsAction("MobilePullGestureReload"));
web_contents()->GetController().Reload(true);
}
......
......@@ -7575,6 +7575,15 @@ should be able to be added at any place in this file.
<description>User closes the tab while preview page is loaded.</description>
</action>
<action name="MobilePullGestureReload">
<owner>jdduke@chromium.org</owner>
<description>
Emitted on Android when a pull-to-refresh touch gesture initiates a page
reload. This fires only after the triggering touch is released while the
refresh effect has been pulled beyond the activation threshold.
</description>
</action>
<action name="MobileReceivedExternalIntent">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
......
......@@ -287,6 +287,7 @@ def AddAndroidActions(actions):
actions.add('MobilePageLoaded')
actions.add('MobilePageLoadedDesktopUserAgent')
actions.add('MobilePageLoadedWithKeyboard')
actions.add('MobilePullGestureReload')
actions.add('MobileReceivedExternalIntent')
actions.add('MobileRendererCrashed')
actions.add('MobileShortcutAllBookmarks')
......
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