Chromium Code Reviews| Index: device/bluetooth/test/mock_bluetooth_adapter.cc |
| diff --git a/device/bluetooth/test/mock_bluetooth_adapter.cc b/device/bluetooth/test/mock_bluetooth_adapter.cc |
| index 4b47579fb1f4fa4eefb49b598f3636ffbc395498..609abc3afb1b52a1884ea11d6badd1c94795b046 100644 |
| --- a/device/bluetooth/test/mock_bluetooth_adapter.cc |
| +++ b/device/bluetooth/test/mock_bluetooth_adapter.cc |
| @@ -46,6 +46,20 @@ void MockBluetoothAdapter::StartDiscoverySessionWithFilter( |
| error_callback); |
| } |
| +void MockBluetoothAdapter::AddMockDevice( |
| + scoped_ptr<MockBluetoothDevice> mock_device) { |
| + mock_devices_.push_back(mock_device.Pass()); |
| +} |
| + |
| +BluetoothAdapter::DeviceList MockBluetoothAdapter::GetMockDevices() { |
| + BluetoothAdapter::DeviceList devices; |
| + for (ScopedVector<MockBluetoothDevice>::iterator it = mock_devices_.begin(); |
| + it != mock_devices_.end(); ++it) { |
|
armansito
2015/05/19 20:18:33
nit: for (auto& it : mock_devices_)
ortuno
2015/05/19 22:25:00
Done.
|
| + devices.push_back(*it); |
| + } |
| + return devices; |
| +} |
| + |
| void MockBluetoothAdapter::RegisterAdvertisement( |
| scoped_ptr<BluetoothAdvertisement::Data> advertisement_data, |
| const CreateAdvertisementCallback& callback, |