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

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: Rebase 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
« no previous file with comments | « content/browser/bluetooth/bluetooth_metrics.h ('k') | device/bluetooth/bluetooth_adapter_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..655fb3ea7304bd50689e9cfc846283791a39c641 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -328,16 +328,18 @@ void WebBluetoothServiceImpl::RequestDevice(
RecordRequestDeviceOptions(options);
if (!GetAdapter()) {
- if (BluetoothAdapterFactoryWrapper::Get().IsBluetoothAdapterAvailable()) {
+ if (BluetoothAdapterFactoryWrapper::Get().IsLowEnergyAvailable()) {
BluetoothAdapterFactoryWrapper::Get().AcquireAdapter(
this, base::Bind(&WebBluetoothServiceImpl::RequestDeviceImpl,
weak_ptr_factory_.GetWeakPtr(),
base::Passed(std::move(options)), callback));
return;
}
- RecordRequestDeviceOutcome(UMARequestDeviceOutcome::NO_BLUETOOTH_ADAPTER);
- callback.Run(blink::mojom::WebBluetoothError::NO_BLUETOOTH_ADAPTER,
- nullptr /* device */);
+ RecordRequestDeviceOutcome(
+ UMARequestDeviceOutcome::BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE);
+ callback.Run(
+ blink::mojom::WebBluetoothError::BLUETOOTH_LOW_ENERGY_NOT_AVAILABLE,
+ nullptr /* device */);
return;
}
RequestDeviceImpl(std::move(options), callback, GetAdapter());
« no previous file with comments | « content/browser/bluetooth/bluetooth_metrics.h ('k') | device/bluetooth/bluetooth_adapter_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698