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

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

Issue 2384463002: bluetooth: mac: Reject requestDevice promise if Mac version is <= 10.9 (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
}

Powered by Google App Engine
This is Rietveld 408576698