Index: content/browser/bluetooth/bluetooth_blocklist.cc |
diff --git a/content/browser/bluetooth/bluetooth_blocklist.cc b/content/browser/bluetooth/bluetooth_blocklist.cc |
index 75bde0b6e3bde1a8acc6386b83b4f06b7cc900b0..4ba1dc1396212eb35b2d7c40f9aab4d6ea0dcf5d 100644 |
--- a/content/browser/bluetooth/bluetooth_blocklist.cc |
+++ b/content/browser/bluetooth/bluetooth_blocklist.cc |
@@ -86,10 +86,13 @@ bool BluetoothBlocklist::IsExcluded(const BluetoothUUID& uuid) const { |
} |
bool BluetoothBlocklist::IsExcluded( |
- const mojo::Array<blink::mojom::WebBluetoothScanFilterPtr>& filters) { |
+ const std::vector<blink::mojom::WebBluetoothScanFilterPtr>& filters) { |
for (const blink::mojom::WebBluetoothScanFilterPtr& filter : filters) { |
- for (const base::Optional<BluetoothUUID>& service : filter->services) { |
- if (IsExcluded(service.value())) { |
+ if (!filter->services) { |
+ continue; |
+ } |
+ for (const BluetoothUUID& service : filter->services.value()) { |
+ if (IsExcluded(service)) { |
return true; |
} |
} |
@@ -115,10 +118,9 @@ bool BluetoothBlocklist::IsExcludedFromWrites(const BluetoothUUID& uuid) const { |
void BluetoothBlocklist::RemoveExcludedUUIDs( |
blink::mojom::WebBluetoothRequestDeviceOptions* options) { |
- mojo::Array<base::Optional<BluetoothUUID>> |
- optional_services_blocklist_filtered; |
- for (const base::Optional<BluetoothUUID>& uuid : options->optional_services) { |
- if (!IsExcluded(uuid.value())) { |
+ std::vector<device::BluetoothUUID> optional_services_blocklist_filtered; |
+ for (const BluetoothUUID& uuid : options->optional_services) { |
+ if (!IsExcluded(uuid)) { |
optional_services_blocklist_filtered.push_back(uuid); |
} |
} |