| Index: device/bluetooth/bluetooth_low_energy_win_fake.cc
|
| diff --git a/device/bluetooth/bluetooth_low_energy_win_fake.cc b/device/bluetooth/bluetooth_low_energy_win_fake.cc
|
| index 6db6444d8e38ca625b2e01f063cf0625670b6b43..67503238f2f2cdd47b297ddd68112fb64835883e 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_win_fake.cc
|
| +++ b/device/bluetooth/bluetooth_low_energy_win_fake.cc
|
| @@ -152,6 +152,14 @@ BLEGattService* BluetoothLowEnergyWrapperFake::SimulateBLEGattService(
|
| return service;
|
| }
|
|
|
| +BLEDevice* BluetoothLowEnergyWrapperFake::GetSimulatedBLEDevice(
|
| + std::string device_address) {
|
| + BLEDevicesMap::iterator it_d = simulated_devices_.find(device_address);
|
| + if (it_d == simulated_devices_.end())
|
| + return nullptr;
|
| + return it_d->second.get();
|
| +}
|
| +
|
| USHORT BluetoothLowEnergyWrapperFake::GenerateAUniqueAttributeHandle(
|
| std::string device_address) {
|
| scoped_ptr<std::set<USHORT>>& set_of_ushort =
|
| @@ -200,7 +208,7 @@ BluetoothLowEnergyWrapperFake::ExtractDeviceAddressFromDevicePath(
|
| base::string16 path) {
|
| std::size_t found = path.find('/');
|
| if (found != base::string16::npos) {
|
| - return path.substr(0, found - 1);
|
| + return path.substr(0, found);
|
| }
|
| return path;
|
| }
|
|
|