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

Unified Diff: device/bluetooth/test/mock_bluetooth_device.cc

Issue 1156573005: bluetooth: Browser-side implementation of getCharacteristic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-get-primary-service-initial
Patch Set: Merged with TOT Created 5 years, 6 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/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..0aa8448b3b8123b7ead169188599eb5447a0729b 100644
--- a/device/bluetooth/test/mock_bluetooth_device.cc
+++ b/device/bluetooth/test/mock_bluetooth_device.cc
@@ -71,4 +71,14 @@ 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

Powered by Google App Engine
This is Rietveld 408576698