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..2b139eb88386fb26d92c6ad6ffd9f9a2ec9f56bf 100644 |
| --- a/device/bluetooth/test/mock_bluetooth_adapter.cc |
| +++ b/device/bluetooth/test/mock_bluetooth_adapter.cc |
| @@ -52,4 +52,18 @@ void MockBluetoothAdapter::RegisterAdvertisement( |
| const CreateAdvertisementErrorCallback& error_callback) { |
| } |
| +void MockBluetoothAdapter::AddMockDevice( |
| + scoped_ptr<MockBluetoothDevice> mock_device) { |
| + mock_devices_.push_back(mock_device.release()); |
|
Jeffrey Yasskin
2015/05/13 21:44:36
You could use .Pass() here, but it doesn't matter
ortuno
2015/05/13 22:12:35
Done.
|
| +} |
| + |
| +BluetoothAdapter::ConstDeviceList MockBluetoothAdapter::GetMockDevices() { |
| + BluetoothAdapter::ConstDeviceList devices; |
| + for (ScopedVector<MockBluetoothDevice>::iterator it = mock_devices_.begin(); |
| + it != mock_devices_.end(); ++it) { |
| + devices.push_back(*it); |
| + } |
| + return devices; |
| +} |
| + |
| } // namespace device |