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

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: Changed MobileSelectionChanged to SelectionChanged. 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
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..d75a73d16ced6e3609a0cdca93808a3a81cb54be 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,9 @@ 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("SelectionChanged"));
selection_handle_dragged_ = true;
// When moving the handle we want to move only the extent point. Before doing

Powered by Google App Engine
This is Rietveld 408576698