Chromium Code Reviews| Index: content/browser/bluetooth/web_bluetooth_service_impl.cc |
| diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| index 9418ebdd985f850fb84a0466588ed3bf5689a594..9fa825c1be5cdd072611c650e8f4faf9a2bbafb0 100644 |
| --- a/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| +++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc |
| @@ -340,6 +340,14 @@ void WebBluetoothServiceImpl::RequestDevice( |
| nullptr /* device */); |
| return; |
| } |
| + if (!BluetoothAdapterFactoryWrapper::Get().IsLowEnergyAvailable()) { |
|
ortuno
2016/10/04 03:20:24
Replace BluetoothAdapterFactoryWrapper::Get().IsBl
François Beaufort
2016/10/04 10:00:22
Done.
|
| + RecordRequestDeviceOutcome( |
| + UMARequestDeviceOutcome::BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE); |
|
ortuno
2016/10/04 03:20:24
Use this errors rather than the NO_BLUETOOTH_ADAPT
François Beaufort
2016/10/04 10:00:22
Done.
|
| + callback.Run( |
| + blink::mojom::WebBluetoothError::BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE, |
| + nullptr /* device */); |
| + return; |
| + } |
| RequestDeviceImpl(std::move(options), callback, GetAdapter()); |
| } |