diff --git a/ash/touch/touch_uma.cc b/ash/touch/touch_uma.cc index 435c2391a3ebf3..8782b2f3cfee0e 100644 --- a/ash/touch/touch_uma.cc +++ b/ash/touch/touch_uma.cc @@ -4,18 +4,12 @@ #include "ash/touch/touch_uma.h" -#include "ash/shell.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" #include "base/optional.h" -#include "base/strings/stringprintf.h" -#include "ui/aura/env.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/base/class_property.h" #include "ui/events/event.h" -#include "ui/events/event_utils.h" -#include "ui/gfx/geometry/point_conversions.h" namespace { @@ -68,46 +62,12 @@ void TouchUMA::RecordGestureAction(GestureActionType action) { void TouchUMA::RecordTouchEvent(aura::Window* target, const ui::TouchEvent& event) { - UMA_HISTOGRAM_CUSTOM_COUNTS( - "Ash.TouchRadius", - static_cast(std::max(event.pointer_details().radius_x, - event.pointer_details().radius_y)), - 1, 500, 100); - WindowTouchDetails* details = target->GetProperty(kWindowTouchDetails); if (!details) { details = new WindowTouchDetails; target->SetProperty(kWindowTouchDetails, details); } - // Record the location of the touch points. - const int kBucketCountForLocation = 100; - const gfx::Rect bounds = target->GetRootWindow()->bounds(); - const int bucket_size_x = - std::max(1, bounds.width() / kBucketCountForLocation); - const int bucket_size_y = - std::max(1, bounds.height() / kBucketCountForLocation); - - gfx::Point position = event.root_location(); - - // Prefer raw event location (when available) over calibrated location. - if (event.HasNativeEvent()) { - position = - gfx::ToFlooredPoint(ui::EventLocationFromNative(event.native_event())); - position = gfx::ScaleToFlooredPoint( - position, 1.f / target->layer()->device_scale_factor()); - } - - position.set_x(std::min(bounds.width() - 1, std::max(0, position.x()))); - position.set_y(std::min(bounds.height() - 1, std::max(0, position.y()))); - - UMA_HISTOGRAM_CUSTOM_COUNTS( - "Ash.TouchPositionX", position.x() / bucket_size_x, 1, - kBucketCountForLocation, kBucketCountForLocation + 1); - UMA_HISTOGRAM_CUSTOM_COUNTS( - "Ash.TouchPositionY", position.y() / bucket_size_y, 1, - kBucketCountForLocation, kBucketCountForLocation + 1); - if (event.type() == ui::ET_TOUCH_PRESSED) { base::RecordAction(base::UserMetricsAction("Touchscreen_Down")); diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 17889ee0021fdd..13249fd5845a7e 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -4315,18 +4315,27 @@ uploading your change for review. + + Deprecated 07/2018 due to lack of usage. + tdanderson@chromium.org kuscher@google.com The position of the touch-events along the X axis. + + Deprecated 07/2018 due to lack of usage. + tdanderson@chromium.org kuscher@google.com The position of the touch-events along the Y axis. + + Deprecated 07/2018 due to lack of usage. + tdanderson@chromium.org kuscher@google.com The radius of a touch event.