New issue
Advanced search Search tips

Issue 920683 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Today
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Task



Sign in to add a comment

Change logged enumeration values for Gamepad ID logging

Project Member Reported by mattreynolds@chromium.org, Jan 10

Issue description

When gamepad enumeration occurs, the Gamepad API checks the vendor and product IDs of enumerated devices against a list of known gamepads. When a recognized gamepad is found, an enumeration value is recorded as Gamepad.KnownGamepadConnected. The enumeration value is defined in a way that does not specify the vendor or product IDs.

Since we only record metrics when the device is found on our list and the list is publicly available, it is simple to reverse the enumeration value to find the vendor and product IDs. Using the enumeration value does not provide any additional privacy benefit beyond recording the device IDs directly.

To reduce the maintenance burden of the gamepad ID list, the Gamepad.KnownGamepadConnected enumeration should be replaced with an integer value that combines the vendor and product IDs.

The recorded value should be a 31-bit integer value that combines the 16-bit vendor and product ID. There are few enough vendor IDs with the high bit set that we should be able to treat it as a 15-bit value. See: http://www.linux-usb.org/usb.ids

This change should be made before M73 branch point (Jan 24) to avoid collecting more data with the old enum values.
 
Project Member

Comment 1 by bugdroid, Today (7 hours ago)

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3b246d1b236438215bde47a8868a92380bdef126

commit 3b246d1b236438215bde47a8868a92380bdef126
Author: Matt Reynolds <mattreynolds@google.com>
Date: Tue Jan 22 22:39:48 2019

Replace gamepad ID histogram with a sparse histogram

This CL deprecates the Gamepad.KnownGamepadConnected histogram in
favor of Gamepad.KnownGamepadConnectedWithId. Maintaining the
GamepadId enum for the old enumeration would have incurred a
significant maintenance burden. Instead of assigning an enumeration
value to each known gamepad, the new enumeration value is derived
from the vendor and product ID of the USB or Bluetooth device.

BUG= 920683 

Change-Id: I0ffc85849d6bc6797f47eaa54c9bc1d8b1d58ade
Reviewed-on: https://chromium-review.googlesource.com/c/1406236
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624972}
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/BUILD.gn
[delete] https://crrev.com/9d5f28465152c52594fbcc3298adb894d6c475cb/device/gamepad/gamepad_id.h
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/gamepad_id_list.cc
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/gamepad_id_list.h
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/gamepad_id_list_unittest.cc
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/gamepad_platform_data_fetcher_mac.mm
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/device/gamepad/gamepad_uma.cc
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/3b246d1b236438215bde47a8868a92380bdef126/tools/metrics/histograms/histograms.xml

Comment 2 by mattreyn...@google.com, Today (3 hours ago)

Status: Fixed (was: Assigned)

Sign in to add a comment