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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_device_client.h

Issue 2783733002: Bluetooth: Add service data unit tests for chromeos (Closed)
Patch Set: comments and rebase Created 3 years, 9 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/dbus/fake_bluetooth_device_client.h
diff --git a/device/bluetooth/dbus/fake_bluetooth_device_client.h b/device/bluetooth/dbus/fake_bluetooth_device_client.h
index 1218e9654eb782d3356e9b12857f8f2ad93bfb69..abf086faed45ba09a138a15c09597033b403216a 100644
--- a/device/bluetooth/dbus/fake_bluetooth_device_client.h
+++ b/device/bluetooth/dbus/fake_bluetooth_device_client.h
@@ -156,12 +156,15 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothDeviceClient
void RemoveAllDevices();
// Create a test Bluetooth device with the given properties.
- void CreateTestDevice(const dbus::ObjectPath& adapter_path,
- const base::Optional<std::string> name,
- const std::string alias,
- const std::string device_address,
- const std::vector<std::string>& service_uuids,
- device::BluetoothTransport type);
+ void CreateTestDevice(
+ const dbus::ObjectPath& adapter_path,
+ const base::Optional<std::string> name,
+ const std::string alias,
+ const std::string device_address,
+ const std::vector<std::string>& service_uuids,
+ device::BluetoothTransport type,
+ const std::unordered_map<std::string, std::vector<uint8_t>>&
+ service_data);
void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; }
@@ -169,6 +172,14 @@ class DEVICE_BLUETOOTH_EXPORT FakeBluetoothDeviceClient
// |object_path| to |rssi|, if the fake device exists.
void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi);
+ // Updates the service data property of fake device with object path
+ // |object_path| to merge |service_data| into the existing data,
+ // if the fake device exists.
+ void UpdateServiceData(
+ const dbus::ObjectPath& object_path,
+ const std::unordered_map<std::string, std::vector<uint8_t>>&
+ service_data);
+
static const char kTestPinCode[];
static const int kTestPassKey;

Powered by Google App Engine
This is Rietveld 408576698