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

Unified Diff: chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc

Issue 228643004: device/bluetooth: Add chromeos::BluetoothRemoteGattCharacteristicChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed potentially flaky expectation from unit test. Created 6 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: chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
index c25e71c6b84449dfa50d4e533a874ddbf39a5e0c..55784a974830b6b001b09b53d1f829adabf04774 100644
--- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
+++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
@@ -49,7 +49,10 @@ void FakeBluetoothGattCharacteristicClient::Properties::Get(
dbus::PropertyBase* property,
dbus::PropertySet::GetCallback callback) {
VLOG(1) << "Get " << property->name();
- callback.Run(false);
+
+ // TODO(armansito): Return success or failure here based on characteristic
+ // read permission.
+ callback.Run(true);
}
void FakeBluetoothGattCharacteristicClient::Properties::GetAll() {
@@ -116,8 +119,8 @@ FakeBluetoothGattCharacteristicClient::GetProperties(
return heart_rate_measurement_properties_.get();
}
if (object_path.value() == body_sensor_location_path_) {
- DCHECK(heart_rate_measurement_properties_.get());
- return heart_rate_measurement_properties_.get();
+ DCHECK(body_sensor_location_properties_.get());
+ return body_sensor_location_properties_.get();
}
if (object_path.value() == heart_rate_control_point_path_) {
DCHECK(heart_rate_control_point_properties_.get());
@@ -226,6 +229,21 @@ void FakeBluetoothGattCharacteristicClient::HideHeartRateCharacteristics() {
heart_rate_visible_ = false;
}
+dbus::ObjectPath
+FakeBluetoothGattCharacteristicClient::GetHeartRateMeasurementPath() const {
+ return dbus::ObjectPath(heart_rate_measurement_path_);
+}
+
+dbus::ObjectPath
+FakeBluetoothGattCharacteristicClient::GetBodySensorLocationPath() const {
+ return dbus::ObjectPath(body_sensor_location_path_);
+}
+
+dbus::ObjectPath
+FakeBluetoothGattCharacteristicClient::GetHeartRateControlPointPath() const {
+ return dbus::ObjectPath(heart_rate_control_point_path_);
+}
+
void FakeBluetoothGattCharacteristicClient::OnPropertyChanged(
const dbus::ObjectPath& object_path,
const std::string& property_name) {
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_characteristic_client.h ('k') | chromeos/dbus/fake_bluetooth_gatt_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698