Index: device/bluetooth/test/mock_bluetooth_device.cc |
diff --git a/device/bluetooth/test/mock_bluetooth_device.cc b/device/bluetooth/test/mock_bluetooth_device.cc |
index 928d98cb2939f541d77cc956268c02941a99df3d..19b67a31416dd78bbba630f91f08d3a2550d90d8 100644 |
--- a/device/bluetooth/test/mock_bluetooth_device.cc |
+++ b/device/bluetooth/test/mock_bluetooth_device.cc |
@@ -71,4 +71,13 @@ std::vector<BluetoothGattService*> MockBluetoothDevice::GetMockServices() |
return services; |
} |
+BluetoothGattService* MockBluetoothDevice::GetMockService( |
+ const std::string& identifier) const { |
+ for (BluetoothGattService* service : mock_services_) { |
+ if (service->GetIdentifier() == identifier) |
+ return service; |
+ } |
+ return nullptr; |
+} |
+ |
} // namespace device |