Index: device/bluetooth/test/mock_bluetooth_gatt_service.cc |
diff --git a/device/bluetooth/test/mock_bluetooth_gatt_service.cc b/device/bluetooth/test/mock_bluetooth_gatt_service.cc |
index 37392a66888e62873cdcd1555024a73a36ebf65e..faba596a2d1e4f5f5df8df760955a69167c03511 100644 |
--- a/device/bluetooth/test/mock_bluetooth_gatt_service.cc |
+++ b/device/bluetooth/test/mock_bluetooth_gatt_service.cc |
@@ -33,4 +33,18 @@ MockBluetoothGattService::MockBluetoothGattService( |
MockBluetoothGattService::~MockBluetoothGattService() { |
} |
+void MockBluetoothGattService::AddMockCharacteristic( |
+ scoped_ptr<MockBluetoothGattCharacteristic> mock_characteristic) { |
+ mock_characteristics_.push_back(mock_characteristic.Pass()); |
+} |
+ |
+std::vector<BluetoothGattCharacteristic*> |
+MockBluetoothGattService::GetMockCharacteristics() const { |
+ std::vector<BluetoothGattCharacteristic*> characteristics; |
+ for (BluetoothGattCharacteristic* characteristic : mock_characteristics_) { |
+ characteristics.push_back(characteristic); |
armansito
2015/06/09 19:23:49
Why is this copying necessary? Can't you change th
ortuno
2015/06/09 20:46:42
The compiler complains when trying to convert from
armansito
2015/06/10 02:40:47
If this is a test only method, why not just return
|
+ } |
+ return characteristics; |
+} |
+ |
} // namespace device |