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

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

Issue 2506813003: Use new wrapper types for web_bluetooth.mojom (Closed)
Patch Set: merge master and resolve conflicts Created 4 years, 1 month 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/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 df55b0320087ae479c3eb50fb988ebb7ffa29e86..a0173a5e3644e0eae7285706f6e1f1af7438d4cf 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
+++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.cc
@@ -167,12 +167,16 @@ void BluetoothAllowedDevicesMap::AddUnionOfServicesTo(
std::unordered_set<BluetoothUUID, device::BluetoothUUIDHash>*
unionOfServices) {
for (const auto& filter : options->filters) {
- for (const base::Optional<BluetoothUUID>& uuid : filter->services) {
- unionOfServices->insert(uuid.value());
+ if (!filter->services) {
+ continue;
+ }
+
+ for (const BluetoothUUID& uuid : filter->services.value()) {
+ unionOfServices->insert(uuid);
}
}
- for (const base::Optional<BluetoothUUID>& uuid : options->optional_services) {
- unionOfServices->insert(uuid.value());
+ for (const BluetoothUUID& uuid : options->optional_services) {
+ unionOfServices->insert(uuid);
}
}

Powered by Google App Engine
This is Rietveld 408576698