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

Unified Diff: device/bluetooth/bluetooth_device.cc

Issue 2785383002: Update unit tests for BluetoothDevice::GetPrimaryServicesByUUID() etc. (Closed)
Patch Set: added TODO Created 3 years, 8 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
Index: device/bluetooth/bluetooth_device.cc
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index 665cbb685a68da5afedd3e6cdd60dd8898597fff..186e7f47cb6316d67d185ac8f5573b1d2e3aca47 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -464,43 +464,6 @@ BluetoothDevice::GetPrimaryServicesByUUID(const BluetoothUUID& service_uuid) {
return services;
}
-std::vector<BluetoothRemoteGattCharacteristic*>
-BluetoothDevice::GetCharacteristicsByUUID(
- const std::string& service_instance_id,
- const BluetoothUUID& characteristic_uuid) {
- std::vector<BluetoothRemoteGattCharacteristic*> characteristics;
- VLOG(2) << "Looking for characteristic: "
- << characteristic_uuid.canonical_value();
- BluetoothRemoteGattService* service = GetGattService(service_instance_id);
- if (service) {
- for (BluetoothRemoteGattCharacteristic* characteristic :
- service->GetCharacteristics()) {
- VLOG(2) << "Characteristic in cache: "
- << characteristic->GetUUID().canonical_value();
- if (characteristic->GetUUID() == characteristic_uuid) {
- characteristics.push_back(characteristic);
- }
- }
- }
- return characteristics;
-}
-
-std::vector<device::BluetoothRemoteGattDescriptor*>
-BluetoothDevice::GetDescriptorsByUUID(
- device::BluetoothRemoteGattCharacteristic* characteristic,
- const BluetoothUUID& descriptor_uuid) {
- std::vector<device::BluetoothRemoteGattDescriptor*> descriptors;
- DVLOG(1) << "Looking for descriptor: " << descriptor_uuid.canonical_value();
- for (auto* descriptor : characteristic->GetDescriptors()) {
- DVLOG(1) << "Descriptor in cache: "
- << descriptor->GetUUID().canonical_value();
- if (descriptor->GetUUID() == descriptor_uuid) {
- descriptors.push_back(descriptor);
- }
- }
- return descriptors;
-}
-
void BluetoothDevice::DidConnectGatt() {
for (const auto& callback : create_gatt_connection_success_callbacks_) {
callback.Run(

Powered by Google App Engine
This is Rietveld 408576698