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

Unified Diff: device/bluetooth/bluetooth_adapter_mac.mm

Issue 2910513005: Removing -[NSString UTF8String] calls (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_mac.mm
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index e7ffdbfae1cb5e8a70a517f07e0d57076ad9e990..ad781639947034475b0c99651ae40fa7f7262475 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -545,12 +545,14 @@ void BluetoothAdapterMac::LowEnergyDeviceUpdated(
NSArray* service_uuids =
[advertisement_data objectForKey:CBAdvertisementDataServiceUUIDsKey];
for (CBUUID* uuid in service_uuids) {
- advertised_uuids.push_back(BluetoothUUID([[uuid UUIDString] UTF8String]));
+ advertised_uuids.push_back(
+ BluetoothAdapterMac::BluetoothUUIDWithCBUUID(uuid));
}
NSArray* overflow_service_uuids = [advertisement_data
objectForKey:CBAdvertisementDataOverflowServiceUUIDsKey];
for (CBUUID* uuid in overflow_service_uuids) {
- advertised_uuids.push_back(BluetoothUUID([[uuid UUIDString] UTF8String]));
+ advertised_uuids.push_back(
+ BluetoothAdapterMac::BluetoothUUIDWithCBUUID(uuid));
}
// Get Service Data.
@@ -561,7 +563,7 @@ void BluetoothAdapterMac::LowEnergyDeviceUpdated(
NSData* data = [service_data objectForKey:uuid];
const uint8_t* bytes = static_cast<const uint8_t*>([data bytes]);
size_t length = [data length];
- service_data_map.emplace(BluetoothUUID([[uuid UUIDString] UTF8String]),
+ service_data_map.emplace(BluetoothAdapterMac::BluetoothUUIDWithCBUUID(uuid),
std::vector<uint8_t>(bytes, bytes + length));
}
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_remote_gatt_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698