Add UMA for the number of devices that were in the chooser when a device is paired |
||
Issue descriptionIn the case of not accepting all devices, knowing the number of devices that were in the chooser is helpful for researching some methods to distinguish devices with the same name. UMA needs to be added for the number of devices that were in the chooser a device is paired.
,
Dec 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a commit 63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a Author: juncai <juncai@chromium.org> Date: Mon Dec 19 22:25:38 2016 Add UMA for the number of devices in the chooser when a device is paired In the case of not accepting all devices in the options that are given to WebBluetooth requestDevice(), knowing the number of devices that are in the chooser is helpful for researching some methods to distinguish devices with the same name. This CL adds UMA for the number of devices that are in the chooser when a device is paired. BUG= 674195 Review-Url: https://codereview.chromium.org/2577183002 Cr-Commit-Position: refs/heads/master@{#439593} [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/content/browser/bluetooth/bluetooth_device_chooser_controller.h [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/content/browser/bluetooth/bluetooth_metrics.cc [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/content/browser/bluetooth/bluetooth_metrics.h [modify] https://crrev.com/63b736b52a58abd71e614cd0d2e69c9ecb2d7b3a/tools/metrics/histograms/histograms.xml
,
Dec 19 2016
,
Dec 20 2016
juncai I believe there's a small error in RecordNumOfDevices function. It should be:
void RecordNumOfDevices(bool accept_all_devices, size_t num_of_devices) {
- if (accept_all_devices) {
+ if (!accept_all_devices) {
UMA_HISTOGRAM_SPARSE_SLOWLY(
"Bluetooth.Web.RequestDevice."
"NumOfDevicesInChooserWhenNotAcceptingAllDevices",
std::min(num_of_devices, kMaxNumOfDevices));
}
}
WDYT?
,
Dec 20 2016
Right! Thanks fbeaufort@! I'll make the change.
,
Dec 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4e0ae774e0a981ce792cf149179a216a2a54fbcd commit 4e0ae774e0a981ce792cf149179a216a2a54fbcd Author: juncai <juncai@chromium.org> Date: Tue Dec 20 20:21:04 2016 Fix UMA for the number of devices in the chooser when a device is paired This is a follow-up CL for https://codereview.chromium.org/2577183002/ to fix an if statement at //content/browser/bluetooth/bluetooth_metrics.cc It should be "if (!accept_all_devices)" instead of "if (accept_all_devices)" TBR=scheib@chromium.org BUG= 674195 Review-Url: https://codereview.chromium.org/2590333002 Cr-Commit-Position: refs/heads/master@{#439876} [modify] https://crrev.com/4e0ae774e0a981ce792cf149179a216a2a54fbcd/content/browser/bluetooth/bluetooth_metrics.cc
,
Dec 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/41105d8a7831fff4df07939b32330445cce21a95 commit 41105d8a7831fff4df07939b32330445cce21a95 Author: juncai <juncai@chromium.org> Date: Tue Dec 27 20:32:06 2016 Fix the logic of counting the number of devices for Web Bluetooth chooser UMA This is a follow-up CL for https://codereview.chromium.org/2577183002/ This CL fixes the logic of counting the number of devices. Previously, the |device_ids_| is cleared in function StartDeviceDiscovery(), and since StartDeviceDiscovery() is called after PopulateConnectedDevices(), and PopulateConnectedDevices() may add cached devices. So those added devices are removed from |device_ids_|. This CL fixes this by clearing the |device_ids_| before the PopulateConnectedDevices() function is called. TBR=scheib@chromium.org BUG= 674195 Review-Url: https://codereview.chromium.org/2601773003 Cr-Commit-Position: refs/heads/master@{#440781} [modify] https://crrev.com/41105d8a7831fff4df07939b32330445cce21a95/content/browser/bluetooth/bluetooth_device_chooser_controller.cc |
||
►
Sign in to add a comment |
||
Comment 1 by juncai@chromium.org
, Dec 15 2016