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

Issue 1165053003: Adding support for Low Energy device discovery to BluetoothAdapterMac (Closed)

Created:
5 years, 6 months ago by krstnmnlsn
Modified:
5 years, 6 months ago
Reviewers:
scheib, armansito
CC:
chromium-reviews, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding support for Low Energy device discovery to BluetoothAdapterMac. Modified BluetoothAdapterMac so that AddDiscoverySession can start low energy discovery sessions in addition to classic. Note that the adapter cannot yet add LE devices found to |devices_| because the ability to distinguish LE and classic devices, when they are stored as BluetoothDevice, is not yet implemented. Also added corresponding tests to bluetooth_adapter_mac_unittest.mm and created class MockCentralManager. BUG=496987 Committed: https://crrev.com/c08decbd80f568e4177a4f82942e2ed04c97735e Cr-Commit-Position: refs/heads/master@{#336062}

Patch Set 1 : #

Total comments: 20

Patch Set 2 : Scheib fixes #

Patch Set 3 : adding issue # #

Total comments: 10

Patch Set 4 : trying to fix upstream #

Patch Set 5 : trying new selector #

Patch Set 6 : removing references to CBCentralManager #

Total comments: 15

Patch Set 7 : scheib fixes #2, also adding delegate property to mock #

Patch Set 8 : Working around CBCentralManager dealloc bug by leaking |manager_| #

Patch Set 9 : comment nit on SetManagerForTesting. #

Total comments: 4

Patch Set 10 : comment fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+362 lines, -64 lines) Patch
M device/bluetooth/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter.h View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.h View 1 6 chunks +24 lines, -8 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.mm View 1 2 11 chunks +72 lines, -15 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac_unittest.mm View 1 2 3 4 5 6 2 chunks +132 lines, -1 line 0 comments Download
M device/bluetooth/bluetooth_discovery_manager_mac.h View 1 chunk +2 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_discovery_manager_mac.mm View 4 chunks +4 lines, -4 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_device_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h View 1 2 3 4 5 6 7 8 9 3 chunks +18 lines, -10 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -22 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_central_manager_mac.h View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_central_manager_mac.mm View 1 2 3 4 5 6 1 chunk +38 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 144 (94 generated)
krstnmnlsn
Hey, here is the first of (at least) 2 cls to allow LE device discovery ...
5 years, 6 months ago (2015-06-05 03:32:21 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/40001
5 years, 6 months ago (2015-06-05 16:36:22 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/60525)
5 years, 6 months ago (2015-06-05 17:11:23 UTC) #8
scheib
1/2 way through review, but have to stop for now, here's a few items: https://codereview.chromium.org/1165053003/diff/40001/device/bluetooth/BUILD.gn ...
5 years, 6 months ago (2015-06-05 18:10:20 UTC) #9
scheib
https://codereview.chromium.org/1165053003/diff/40001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/1165053003/diff/40001/device/bluetooth/bluetooth_adapter_mac.mm#newcode213 device/bluetooth/bluetooth_adapter_mac.mm:213: if (!StartDiscovery(discovery_filter)) { Without seeing the plans for how ...
5 years, 6 months ago (2015-06-06 05:09:49 UTC) #10
krstnmnlsn
Thanks! https://codereview.chromium.org/1165053003/diff/40001/device/bluetooth/BUILD.gn File device/bluetooth/BUILD.gn (right): https://codereview.chromium.org/1165053003/diff/40001/device/bluetooth/BUILD.gn#newcode220 device/bluetooth/BUILD.gn:220: "test/mock_bluetooth_central_manager.h", On 2015/06/05 18:10:20, scheib wrote: > Mac ...
5 years, 6 months ago (2015-06-09 01:08:10 UTC) #11
krstnmnlsn
5 years, 6 months ago (2015-06-09 01:10:09 UTC) #12
armansito
lgtm with a few nits. The code is getting cleaner already! https://codereview.chromium.org/1165053003/diff/80001/device/bluetooth/BUILD.gn File device/bluetooth/BUILD.gn (right): ...
5 years, 6 months ago (2015-06-09 19:32:59 UTC) #13
krstnmnlsn
nits done, thanks Arman https://codereview.chromium.org/1165053003/diff/80001/device/bluetooth/BUILD.gn File device/bluetooth/BUILD.gn (right): https://codereview.chromium.org/1165053003/diff/80001/device/bluetooth/BUILD.gn#newcode245 device/bluetooth/BUILD.gn:245: if (is_mac) { On 2015/06/09 ...
5 years, 6 months ago (2015-06-09 23:09:01 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/100001
5 years, 6 months ago (2015-06-11 18:27:24 UTC) #17
commit-bot: I haz the power
Dry run: CLs for remote refs other than refs/pending/heads/master must contain NOTRY=true and NOPRESUBMIT=true in ...
5 years, 6 months ago (2015-06-11 18:27:29 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/100001
5 years, 6 months ago (2015-06-11 19:45:08 UTC) #21
commit-bot: I haz the power
Dry run: CLs for remote refs other than refs/pending/heads/master must contain NOTRY=true and NOPRESUBMIT=true in ...
5 years, 6 months ago (2015-06-11 19:45:17 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/120001
5 years, 6 months ago (2015-06-11 20:54:41 UTC) #26
scheib
LGTM
5 years, 6 months ago (2015-06-11 21:22:00 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/62740)
5 years, 6 months ago (2015-06-11 21:29:48 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/140001
5 years, 6 months ago (2015-06-11 22:18:10 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/76122)
5 years, 6 months ago (2015-06-11 22:49:26 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/180001
5 years, 6 months ago (2015-06-12 18:08:37 UTC) #40
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/76450)
5 years, 6 months ago (2015-06-12 18:41:52 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/200001
5 years, 6 months ago (2015-06-12 22:37:44 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/63278)
5 years, 6 months ago (2015-06-12 23:04:44 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/220001
5 years, 6 months ago (2015-06-13 00:04:07 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/260001
5 years, 6 months ago (2015-06-13 00:36:52 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/240002
5 years, 6 months ago (2015-06-13 00:50:24 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/290001
5 years, 6 months ago (2015-06-13 01:58:25 UTC) #63
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/63365)
5 years, 6 months ago (2015-06-13 02:23:13 UTC) #65
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/310001
5 years, 6 months ago (2015-06-16 00:21:26 UTC) #68
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/63830)
5 years, 6 months ago (2015-06-16 00:39:50 UTC) #70
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/330001
5 years, 6 months ago (2015-06-16 00:49:49 UTC) #74
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/350001
5 years, 6 months ago (2015-06-16 01:18:08 UTC) #78
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/63859)
5 years, 6 months ago (2015-06-16 01:43:07 UTC) #80
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/370001
5 years, 6 months ago (2015-06-16 21:16:26 UTC) #83
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/77616)
5 years, 6 months ago (2015-06-16 21:53:10 UTC) #85
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/390001
5 years, 6 months ago (2015-06-17 00:17:19 UTC) #92
krstnmnlsn
So I think it's finally going to compile on 10.6 (still waiting on a few ...
5 years, 6 months ago (2015-06-17 00:35:49 UTC) #93
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/100053)
5 years, 6 months ago (2015-06-17 02:08:18 UTC) #95
scheib
https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm File device/bluetooth/bluetooth_adapter_mac_unittest.mm (right): https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm#newcode33 device/bluetooth/bluetooth_adapter_mac_unittest.mm:33: // Cannot use a OCMockObject because mocking 'state' property ...
5 years, 6 months ago (2015-06-17 16:55:08 UTC) #96
krstnmnlsn
Thanks Vincent! https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm File device/bluetooth/bluetooth_adapter_mac_unittest.mm (right): https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm#newcode33 device/bluetooth/bluetooth_adapter_mac_unittest.mm:33: // Cannot use a OCMockObject because mocking ...
5 years, 6 months ago (2015-06-17 20:18:41 UTC) #98
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/430001
5 years, 6 months ago (2015-06-17 20:23:53 UTC) #101
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/78107)
5 years, 6 months ago (2015-06-18 01:56:14 UTC) #103
scheib
LGTM again https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm File device/bluetooth/bluetooth_adapter_mac_unittest.mm (right): https://codereview.chromium.org/1165053003/diff/390001/device/bluetooth/bluetooth_adapter_mac_unittest.mm#newcode38 device/bluetooth/bluetooth_adapter_mac_unittest.mm:38: adapter_mac_->low_energy_discovery_manager_->SetManager( On 2015/06/17 20:18:41, krstnmnlsn wrote: > ...
5 years, 6 months ago (2015-06-18 18:11:07 UTC) #104
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/990001
5 years, 6 months ago (2015-06-24 22:43:35 UTC) #134
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 6 months ago (2015-06-24 23:12:43 UTC) #136
scheib
https://codereview.chromium.org/1165053003/diff/990001/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h File device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h (right): https://codereview.chromium.org/1165053003/diff/990001/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h#newcode83 device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h:83: // Underlying CoreBluetooth central manager. Deallocating CBCentralManager // Underlying ...
5 years, 6 months ago (2015-06-24 23:24:25 UTC) #137
krstnmnlsn
comments fixed! https://codereview.chromium.org/1165053003/diff/990001/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h File device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h (right): https://codereview.chromium.org/1165053003/diff/990001/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h#newcode83 device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h:83: // Underlying CoreBluetooth central manager. Deallocating CBCentralManager ...
5 years, 6 months ago (2015-06-24 23:42:26 UTC) #138
scheib
LGTM
5 years, 6 months ago (2015-06-25 00:06:26 UTC) #139
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1165053003/1010001
5 years, 6 months ago (2015-06-25 00:31:49 UTC) #142
commit-bot: I haz the power
Committed patchset #10 (id:1010001)
5 years, 6 months ago (2015-06-25 01:26:25 UTC) #143
commit-bot: I haz the power
5 years, 6 months ago (2015-06-25 01:27:24 UTC) #144
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/c08decbd80f568e4177a4f82942e2ed04c97735e
Cr-Commit-Position: refs/heads/master@{#336062}

Powered by Google App Engine
This is Rietveld 408576698