| Index: content/browser/bluetooth/bluetooth_allowed_devices_map.cc
|
| diff --git a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
|
| index 1f9b2cfd755cc00b7b5685266369e9a2b4940b5d..1e7074b848db2e876318b945eef244262fe58c70 100644
|
| --- a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
|
| +++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/base64.h"
|
| #include "base/logging.h"
|
| +#include "base/optional.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_util.h"
|
| #include "content/browser/bluetooth/bluetooth_blacklist.h"
|
| @@ -129,8 +130,8 @@ const std::string& BluetoothAllowedDevicesMap::GetDeviceAddress(
|
| bool BluetoothAllowedDevicesMap::IsOriginAllowedToAccessService(
|
| const url::Origin& origin,
|
| const std::string& device_id,
|
| - const std::string& service_uuid) const {
|
| - if (BluetoothBlacklist::Get().IsExcluded(BluetoothUUID(service_uuid))) {
|
| + const BluetoothUUID& service_uuid) const {
|
| + if (BluetoothBlacklist::Get().IsExcluded(service_uuid)) {
|
| return false;
|
| }
|
|
|
| @@ -159,14 +160,14 @@ std::string BluetoothAllowedDevicesMap::GenerateDeviceId() {
|
|
|
| void BluetoothAllowedDevicesMap::AddUnionOfServicesTo(
|
| const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options,
|
| - std::set<std::string>* unionOfServices) {
|
| + std::unordered_set<BluetoothUUID>* unionOfServices) {
|
| for (const auto& filter : options->filters) {
|
| - for (const std::string& uuid : filter->services) {
|
| - unionOfServices->insert(uuid);
|
| + for (const base::Optional<BluetoothUUID>& uuid : filter->services) {
|
| + unionOfServices->insert(uuid.value());
|
| }
|
| }
|
| - for (const std::string& uuid : options->optional_services) {
|
| - unionOfServices->insert(uuid);
|
| + for (const base::Optional<BluetoothUUID>& uuid : options->optional_services) {
|
| + unionOfServices->insert(uuid.value());
|
| }
|
| }
|
|
|
|
|