Chromium Code Reviews| Index: device/bluetooth/test/fake_bluetooth.cc |
| diff --git a/device/bluetooth/test/fake_bluetooth.cc b/device/bluetooth/test/fake_bluetooth.cc |
| index 08c6615c208933c6cea416a9293cf9a81a2e92ce..fe474b0077b52bef5f823b53d8e6fb6bc75b99e2 100644 |
| --- a/device/bluetooth/test/fake_bluetooth.cc |
| +++ b/device/bluetooth/test/fake_bluetooth.cc |
| @@ -32,4 +32,12 @@ void FakeBluetooth::SetLESupported(bool supported, |
| callback.Run(); |
| } |
| +void FakeBluetooth::SimulateCentral(mojom::CentralState state, |
| + const SimulateCentralCallback& callback) { |
| + mojom::FakeCentralPtr fake_central_ptr; |
| + fake_central_ = new FakeCentral(state, mojo::MakeRequest(&fake_central_ptr)); |
|
dcheng
2017/05/04 00:55:04
Nit: maybe use base::MakeShared<FakeCentral> to ma
ortuno
2017/05/04 05:28:24
Done.
|
| + device::BluetoothAdapterFactory::SetAdapterForTesting(fake_central_); |
| + callback.Run(std::move(fake_central_ptr)); |
| +} |
| + |
| } // namespace bluetooth |