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

Issue 2339253002: bluetooth: mac: add connected LE devices to chooser (Closed)

Created:
4 years, 3 months ago by jlebel
Modified:
4 years, 1 month ago
CC:
chromium-reviews, ortuno+watch_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: mac: add connected LE devices to chooser On a mac, when showing list of available low energy devices, low energy devices which are connected are not shown. To get the list of devices, -[CBCentralManager scanForPeripheralsWithServices:options:] is used. This method reports only advertising devices. For devices that are connected but doesn't advertise, -[CBCentralManager retrieveConnectedPeripheralsWithServices:] needs to be called when starting a discovery session. BUG=630581 Committed: https://crrev.com/ff8c749c2d358b34184d156fb0939a14e264438f Cr-Commit-Position: refs/heads/master@{#430229}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Moving the code in bluetooth_adapter_mac.mm #

Patch Set 3 : Adding BluetoothAdapter::RetrievedConnectedPeripherals() and the implementation in BluetoothAdapter… #

Total comments: 12

Patch Set 4 : Cleanup #

Total comments: 11

Patch Set 5 : Better implementation #

Total comments: 1

Patch Set 6 : Implementing RetrieveGattConnectedDevicesWithDiscoveryFilter() with tests #

Total comments: 32

Patch Set 7 : More tests, and fixing ortuno's comments #

Total comments: 34

Patch Set 8 : Nit for the tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -21 lines) Patch
M device/bluetooth/bluetooth_adapter.h View 1 2 3 4 5 6 3 chunks +14 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_adapter.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.h View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.mm View 1 2 3 4 5 6 7 4 chunks +89 lines, -18 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_unittest.cc View 1 2 3 4 5 6 7 1 chunk +185 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_device_mac.mm View 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test.h View 1 2 3 4 5 6 2 chunks +20 lines, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test_mac.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test_mac.mm View 1 2 3 4 5 6 7 3 chunks +47 lines, -0 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_central_manager_mac.h View 1 2 3 4 5 6 2 chunks +10 lines, -0 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_central_manager_mac.mm View 1 2 3 4 5 6 3 chunks +52 lines, -1 line 0 comments Download

Messages

Total messages: 69 (31 generated)
François Beaufort
Here are my 2 cents. You might want to update BUG ID as well ;) ...
4 years, 3 months ago (2016-09-15 07:38:16 UTC) #7
jlebel
Hello Giovanni , Can you review my patch about the adding connected peripherals on the ...
4 years, 3 months ago (2016-09-21 13:49:28 UTC) #13
ortuno
I don't think we should do this during discovery. They are two separate concepts and ...
4 years, 3 months ago (2016-09-21 23:17:20 UTC) #16
jlebel
On 2016/09/21 23:17:20, ortuno wrote: > I don't think we should do this during discovery. ...
4 years, 3 months ago (2016-09-22 13:58:37 UTC) #17
jracle (use Gerrit)
On 2016/09/22 13:58:37, jlebel wrote: > On 2016/09/21 23:17:20, ortuno wrote: > > I don't ...
4 years, 3 months ago (2016-09-22 14:28:49 UTC) #18
ortuno
On 2016/09/22 at 13:58:37, jlebel wrote: > On 2016/09/21 23:17:20, ortuno wrote: > > I ...
4 years, 3 months ago (2016-09-23 00:56:48 UTC) #19
jlebel
On 2016/09/23 00:56:48, ortuno wrote: > On 2016/09/22 at 13:58:37, jlebel wrote: > > On ...
4 years, 2 months ago (2016-09-28 12:24:15 UTC) #20
ortuno
Ah right. Are you worried about the peripherals mac sent expiring or us expiring the ...
4 years, 2 months ago (2016-09-28 23:15:52 UTC) #21
jlebel
https://codereview.chromium.org/2339253002/diff/60001/device/bluetooth/bluetooth_adapter.h File device/bluetooth/bluetooth_adapter.h (right): https://codereview.chromium.org/2339253002/diff/60001/device/bluetooth/bluetooth_adapter.h#newcode323 device/bluetooth/bluetooth_adapter.h:323: // This function get add all the connected peripherals ...
4 years, 2 months ago (2016-10-05 14:09:41 UTC) #22
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { +scheib for thoughts. Some context: We ...
4 years, 2 months ago (2016-10-06 02:22:07 UTC) #27
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/06 at 02:22:07, ortuno wrote: ...
4 years, 2 months ago (2016-10-06 02:22:52 UTC) #29
scheib
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/06 02:22:07, ortuno wrote: > ...
4 years, 2 months ago (2016-10-06 21:01:34 UTC) #32
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/06 at 21:01:34, scheib wrote: ...
4 years, 2 months ago (2016-10-06 23:43:12 UTC) #33
scheib
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/06 23:43:12, ortuno wrote: > ...
4 years, 2 months ago (2016-10-07 17:08:01 UTC) #34
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/07 at 17:08:00, scheib wrote: ...
4 years, 2 months ago (2016-10-10 02:57:22 UTC) #35
scheib
On 2016/10/10 02:57:22, ortuno wrote: > https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm > File device/bluetooth/bluetooth_adapter_mac.mm (right): > > https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 > ...
4 years, 2 months ago (2016-10-10 18:00:27 UTC) #36
ortuno
On 2016/10/10 at 18:00:27, scheib wrote: > On 2016/10/10 02:57:22, ortuno wrote: > > https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm ...
4 years, 2 months ago (2016-10-10 23:34:09 UTC) #37
ortuno
Chatted offline with scheib and jyasskin. The conclusion was that: 1. We should rename the ...
4 years, 2 months ago (2016-10-12 02:53:09 UTC) #38
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode178 device/bluetooth/bluetooth_adapter_mac.mm:178: CBUUID* genericAccessServiceUUID = [CBUUID UUIDWithString:@"1800"]; I've been thinking about ...
4 years, 2 months ago (2016-10-12 06:42:46 UTC) #39
jlebel
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode173 device/bluetooth/bluetooth_adapter_mac.mm:173: void BluetoothAdapterMac::RetrievedConnectedPeripherals() { On 2016/10/10 02:57:22, ortuno wrote: > ...
4 years, 2 months ago (2016-10-13 15:29:02 UTC) #40
ortuno
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode178 device/bluetooth/bluetooth_adapter_mac.mm:178: CBUUID* genericAccessServiceUUID = [CBUUID UUIDWithString:@"1800"]; On 2016/10/13 at 15:29:01, ...
4 years, 2 months ago (2016-10-14 03:03:04 UTC) #41
scheib
https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode178 device/bluetooth/bluetooth_adapter_mac.mm:178: CBUUID* genericAccessServiceUUID = [CBUUID UUIDWithString:@"1800"]; On 2016/10/14 03:03:03, ortuno ...
4 years, 2 months ago (2016-10-14 17:16:14 UTC) #42
ortuno
On 2016/10/14 at 17:16:14, scheib wrote: > https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm > File device/bluetooth/bluetooth_adapter_mac.mm (right): > > https://codereview.chromium.org/2339253002/diff/80001/device/bluetooth/bluetooth_adapter_mac.mm#newcode178 ...
4 years, 2 months ago (2016-10-17 02:43:49 UTC) #43
ortuno
On 2016/10/17 at 02:43:49, ortuno wrote: > On 2016/10/14 at 17:16:14, scheib wrote: > > ...
4 years, 2 months ago (2016-10-17 02:46:36 UTC) #44
scheib
On 2016/10/17 02:46:36, ortuno wrote: > On 2016/10/17 at 02:43:49, ortuno wrote: > > On ...
4 years, 2 months ago (2016-10-18 04:56:16 UTC) #45
jlebel
Hello Giovani, I think there is a mistake: BluetoothDeviceChooserController::AddFilteredDevice() takes only one parameter. Is there ...
4 years, 2 months ago (2016-10-19 20:25:22 UTC) #46
ortuno
On 2016/10/19 at 20:25:22, jlebel wrote: > Hello Giovani, > > I think there is ...
4 years, 2 months ago (2016-10-19 23:24:29 UTC) #47
jlebel
Thanks for your help, Giovanni! Let me know what you think about my implementation and ...
4 years, 1 month ago (2016-10-26 17:11:03 UTC) #50
scheib
https://codereview.chromium.org/2339253002/diff/160001/device/bluetooth/bluetooth_adapter.h File device/bluetooth/bluetooth_adapter.h (right): https://codereview.chromium.org/2339253002/diff/160001/device/bluetooth/bluetooth_adapter.h#newcode321 device/bluetooth/bluetooth_adapter.h:321: // This function get all the connected peripherals into ...
4 years, 1 month ago (2016-10-28 20:35:50 UTC) #51
ortuno
https://codereview.chromium.org/2339253002/diff/160001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2339253002/diff/160001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode339 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:339: std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter = Let's not change web bluetooth yet. ...
4 years, 1 month ago (2016-10-31 04:30:51 UTC) #52
jlebel
Thanks for your input and your help! https://codereview.chromium.org/2339253002/diff/160001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2339253002/diff/160001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode339 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:339: std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter ...
4 years, 1 month ago (2016-11-07 01:43:18 UTC) #54
ortuno
Almost there! Thanks for sticking with it! https://codereview.chromium.org/2339253002/diff/200001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2339253002/diff/200001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode339 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:339: std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter ...
4 years, 1 month ago (2016-11-07 03:12:34 UTC) #55
jlebel
Thanks for your time. https://codereview.chromium.org/2339253002/diff/200001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc File content/browser/bluetooth/bluetooth_device_chooser_controller.cc (right): https://codereview.chromium.org/2339253002/diff/200001/content/browser/bluetooth/bluetooth_device_chooser_controller.cc#newcode339 content/browser/bluetooth/bluetooth_device_chooser_controller.cc:339: std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter = On 2016/11/07 ...
4 years, 1 month ago (2016-11-07 05:56:39 UTC) #59
ortuno
lgtm! Thanks!!
4 years, 1 month ago (2016-11-07 06:03:00 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2339253002/240001
4 years, 1 month ago (2016-11-07 07:14:38 UTC) #64
commit-bot: I haz the power
Committed patchset #8 (id:240001)
4 years, 1 month ago (2016-11-07 07:18:57 UTC) #66
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/ff8c749c2d358b34184d156fb0939a14e264438f Cr-Commit-Position: refs/heads/master@{#430229}
4 years, 1 month ago (2016-11-07 07:20:32 UTC) #68
jracle (use Gerrit)
4 years, 1 month ago (2016-11-07 09:20:18 UTC) #69
Message was sent while issue was closed.
On 2016/11/07 07:20:32, commit-bot: I haz the power wrote:
> Patchset 8 (id:??) landed as
> https://crrev.com/ff8c749c2d358b34184d156fb0939a14e264438f
> Cr-Commit-Position: refs/heads/master@{#430229}

Thanks a lot guys! I'll give a try soon.

Powered by Google App Engine
This is Rietveld 408576698