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

Issue 424093004: Improve processing of Bluetooth device discovery on Windows. (Closed)

Created:
6 years, 4 months ago by rpaquay
Modified:
6 years, 4 months ago
Reviewers:
xiyuan
CC:
chromium-reviews, armansito, keybuk
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improve processing of Bluetooth device discovery on Windows. * Merge all events into DevicesPolled event, as this better reflects how the underlying discovery work in Windows. * Process the list of devices from DevicesPolled event with more granularity so we can detect adding, removing and updating single devices, and raise the appropriate events to the Chrome App. Add unit tests. * Don't emit "DevicesPolled" events when the worker thread encounters issues enumerating devices and services. Instead, log warnings and ignore the result of the enumeration. This is required to avoid a Chrome App being notified of inconsistent events if the worker thread can't successfully enumerate all devices/services. * Fix call to BluetoothFindDeviceOpen to use LUP_FLUSHCACHE when in "discovery" mode, ensuring services are discovered using a active SDP request. BUG=396337 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286755

Patch Set 1 #

Patch Set 2 : Code cleanup, add unit tests. #

Patch Set 3 : Improve error handling + log errors during polling of Bluetooth devices. #

Patch Set 4 : Rebasing, code cleanup, git cl format. #

Total comments: 14

Patch Set 5 : Address code review feedback (nits and memory leak). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+640 lines, -260 lines) Patch
M device/bluetooth/bluetooth_adapter_win.h View 1 chunk +2 lines, -7 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_win.cc View 1 2 3 1 chunk +58 lines, -15 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_win_unittest.cc View 1 2 3 4 5 chunks +96 lines, -20 lines 0 comments Download
M device/bluetooth/bluetooth_device_win.h View 1 2 3 3 chunks +14 lines, -3 lines 0 comments Download
M device/bluetooth/bluetooth_device_win.cc View 1 2 3 4 3 chunks +90 lines, -14 lines 0 comments Download
M device/bluetooth/bluetooth_device_win_unittest.cc View 1 3 chunks +26 lines, -14 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_win.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_win.cc View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M device/bluetooth/bluetooth_service_record_win.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_service_record_win.cc View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_task_manager_win.h View 1 2 3 6 chunks +57 lines, -17 lines 0 comments Download
M device/bluetooth/bluetooth_task_manager_win.cc View 1 2 3 4 9 chunks +279 lines, -165 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
rpaquay
This CL addresses many (but not all) issues found in BUG=396337
6 years, 4 months ago (2014-07-30 20:33:50 UTC) #1
xiyuan
https://codereview.chromium.org/424093004/diff/60001/device/bluetooth/bluetooth_device_win.cc File device/bluetooth/bluetooth_device_win.cc (right): https://codereview.chromium.org/424093004/diff/60001/device/bluetooth/bluetooth_device_win.cc#newcode116 device/bluetooth/bluetooth_device_win.cc:116: if (removed_services.size()) { nit: !removed_services.empty() https://codereview.chromium.org/424093004/diff/60001/device/bluetooth/bluetooth_device_win.cc#newcode121 device/bluetooth/bluetooth_device_win.cc:121: if (added_devices.size()) ...
6 years, 4 months ago (2014-07-30 21:41:47 UTC) #2
rpaquay
Addressed all feedback. Thanks for the quick turnaround and good catch on the leak! https://codereview.chromium.org/424093004/diff/60001/device/bluetooth/bluetooth_device_win.cc ...
6 years, 4 months ago (2014-07-30 22:34:25 UTC) #3
xiyuan
lgtm
6 years, 4 months ago (2014-07-30 22:35:51 UTC) #4
rpaquay
The CQ bit was checked by rpaquay@chromium.org
6 years, 4 months ago (2014-07-30 22:43:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rpaquay@chromium.org/424093004/80001
6 years, 4 months ago (2014-07-30 22:48:25 UTC) #6
commit-bot: I haz the power
6 years, 4 months ago (2014-07-31 12:17:30 UTC) #7
Message was sent while issue was closed.
Change committed as 286755

Powered by Google App Engine
This is Rietveld 408576698