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

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

Issue 1973343005: Remove service, add device, in BluetoothLocalGattService::Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/bluetooth_test_bluez.cc
diff --git a/device/bluetooth/test/bluetooth_test_bluez.cc b/device/bluetooth/test/bluetooth_test_bluez.cc
index 5046af3b17e047b9315bba2b81c87e0be76bc748..182fd0f1840d261c6f232d568c5ce4eb9311c666 100644
--- a/device/bluetooth/test/bluetooth_test_bluez.cc
+++ b/device/bluetooth/test/bluetooth_test_bluez.cc
@@ -124,7 +124,6 @@ BluetoothDevice* BluetoothTestBlueZ::SimulateLowEnergyDevice(
}
void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueReadRequest(
- BluetoothLocalGattService* service,
BluetoothLocalGattCharacteristic* characteristic,
const BluetoothLocalGattService::Delegate::ValueCallback& value_callback,
const base::Closure& error_callback) {
@@ -140,7 +139,8 @@ void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueReadRequest(
characteristic_bluez->object_path());
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
- static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(
+ characteristic->GetService());
static_cast<TestBluetoothLocalGattServiceDelegate*>(
service_bluez->GetDelegate())
->set_expected_characteristic(characteristic);
@@ -153,7 +153,6 @@ void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueReadRequest(
}
void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueWriteRequest(
- BluetoothLocalGattService* service,
BluetoothLocalGattCharacteristic* characteristic,
const std::vector<uint8_t>& value_to_write,
const base::Closure& success_callback,
@@ -170,7 +169,8 @@ void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueWriteRequest(
characteristic_bluez->object_path());
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
- static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(
+ characteristic->GetService());
static_cast<TestBluetoothLocalGattServiceDelegate*>(
service_bluez->GetDelegate())
->set_expected_characteristic(characteristic);
@@ -184,7 +184,6 @@ void BluetoothTestBlueZ::SimulateLocalGattCharacteristicValueWriteRequest(
}
void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueReadRequest(
- BluetoothLocalGattService* service,
BluetoothLocalGattDescriptor* descriptor,
const BluetoothLocalGattService::Delegate::ValueCallback& value_callback,
const base::Closure& error_callback) {
@@ -198,7 +197,8 @@ void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueReadRequest(
descriptor_bluez->object_path());
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
- static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(
+ descriptor->GetCharacteristic()->GetService());
static_cast<TestBluetoothLocalGattServiceDelegate*>(
service_bluez->GetDelegate())
->set_expected_descriptor(descriptor);
@@ -211,7 +211,6 @@ void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueReadRequest(
}
void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueWriteRequest(
- BluetoothLocalGattService* service,
BluetoothLocalGattDescriptor* descriptor,
const std::vector<uint8_t>& value_to_write,
const base::Closure& success_callback,
@@ -226,7 +225,8 @@ void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueWriteRequest(
descriptor_bluez->object_path());
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
- static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(
+ descriptor->GetCharacteristic()->GetService());
static_cast<TestBluetoothLocalGattServiceDelegate*>(
service_bluez->GetDelegate())
->set_expected_descriptor(descriptor);
@@ -240,7 +240,6 @@ void BluetoothTestBlueZ::SimulateLocalGattDescriptorValueWriteRequest(
}
bool BluetoothTestBlueZ::SimulateLocalGattCharacteristicNotificationsRequest(
- BluetoothLocalGattService* service,
BluetoothLocalGattCharacteristic* characteristic,
bool start) {
bluez::BluetoothLocalGattCharacteristicBlueZ* characteristic_bluez =
@@ -255,7 +254,8 @@ bool BluetoothTestBlueZ::SimulateLocalGattCharacteristicNotificationsRequest(
characteristic_bluez->object_path());
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
- static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(
+ characteristic->GetService());
static_cast<TestBluetoothLocalGattServiceDelegate*>(
service_bluez->GetDelegate())
->set_expected_characteristic(characteristic);
« no previous file with comments | « device/bluetooth/test/bluetooth_test_bluez.h ('k') | device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698