Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: ui/touch_selection/touch_selection_controller.cc

Issue 1965013004: Record user actions for long-press follow-on actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed most actions: Prefixed the mobile action bar actions with "MobileActionMode.", the contextu… Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/metrics/actions/actions.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/touch_selection_controller.cc
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc
index 230942f6f7f3a2163791a64d2837ec3bbf984c0e..e4dcb7e71d742e5df999427ea95cb82a3671cdc2 100644
--- a/ui/touch_selection/touch_selection_controller.cc
+++ b/ui/touch_selection/touch_selection_controller.cc
@@ -7,6 +7,7 @@
#include "base/auto_reset.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
+#include "base/metrics/user_metrics.h"
namespace ui {
namespace {
@@ -384,6 +385,10 @@ void TouchSelectionController::OnDragBegin(
if (anchor_drag_to_selection_start_)
std::swap(base, extent);
+ // If this is the first drag, log an action to allow user action sequencing.
+ if (!selection_handle_dragged_) {
+ base::RecordAction(base::UserMetricsAction("MobileSelectionChanged"));
mohsen 2016/05/12 17:27:44 nit: By "Mobile" do you mean Android? Can we use a
Donn Denman 2016/05/12 17:37:46 Good point -- changed to SelectionChanged.
+ }
selection_handle_dragged_ = true;
// When moving the handle we want to move only the extent point. Before doing
« no previous file with comments | « tools/metrics/actions/actions.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698