Chromium Code Reviews| 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..0634f8f37e58bf0439ff78a81884ce1c45c110c6 100644 |
| --- a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc |
| +++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc |
| @@ -129,8 +129,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 +159,15 @@ std::string BluetoothAllowedDevicesMap::GenerateDeviceId() { |
| void BluetoothAllowedDevicesMap::AddUnionOfServicesTo( |
| const blink::mojom::WebBluetoothRequestDeviceOptionsPtr& options, |
| - std::set<std::string>* unionOfServices) { |
| + std::set<BluetoothUUID>* unionOfServices) { |
| for (const auto& filter : options->filters) { |
| - for (const std::string& uuid : filter->services) { |
| - unionOfServices->insert(uuid); |
| + for (const std::unique_ptr<BluetoothUUID>& uuid : filter->services) { |
|
Jeffrey Yasskin
2016/05/28 04:38:06
I'm definitely sad that there's no type-based way
ortuno
2016/05/31 17:30:47
I'm OK with waiting.
|
| + unionOfServices->insert(*uuid); |
| } |
| } |
| - for (const std::string& uuid : options->optional_services) { |
| - unionOfServices->insert(uuid); |
| + for (const std::unique_ptr<BluetoothUUID>& uuid : |
| + options->optional_services) { |
| + unionOfServices->insert(*uuid); |
| } |
| } |