Chromium Code Reviews| Index: device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm |
| diff --git a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm |
| index eeb1ace3beb1996e17dc2abb39103a7ffc787899..70cece66244dc5197c4c2f70b60d6d532e31148c 100644 |
| --- a/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm |
| +++ b/device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm |
| @@ -73,6 +73,21 @@ void BluetoothLowEnergyDiscoveryManagerMac::TryStartDiscovery() { |
| CBCentralManagerScanOptionAllowDuplicatesKey : |
| @YES |
| }]; |
| + NSArray* connectedServices; |
| + if (services) { |
| + connectedServices = services; |
| + } else { |
| + CBUUID* defaultService = [CBUUID UUIDWithString:@"1800"]; |
|
François Beaufort
2016/09/15 07:38:16
You may want to add a comment there to explain why
jlebel
2016/09/21 13:49:28
Done.
|
| + connectedServices = @[ defaultService ]; |
| + } |
| +#pragma clang diagnostic push |
| +#pragma clang diagnostic ignored "-Wpartial-availability" |
|
François Beaufort
2016/09/15 07:38:16
According to https://developer.apple.com/reference
jlebel
2016/09/21 13:49:28
I think it is a terrible idea to create a fake dec
|
| + NSArray* peripherals = [central_manager_ |
| + retrieveConnectedPeripheralsWithServices:connectedServices]; |
| +#pragma clang diagnostic pop |
| + for (CBPeripheral* peripheral in peripherals) { |
| + observer_->LowEnergyDeviceUpdated(peripheral, nil, 0); |
|
François Beaufort
2016/09/15 07:38:16
Nit: observer_->LowEnergyDeviceUpdated(peripheral
jlebel
2016/09/21 13:49:28
Done.
|
| + } |
| pending_ = false; |
| } |