OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h" | 5 #include "chrome/browser/chromeos/bluetooth/test/mock_bluetooth_adapter.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 MockBluetoothAdapter::MockBluetoothAdapter() {} | 9 MockBluetoothAdapter::MockBluetoothAdapter() : local_oob_data_(NULL) {} |
10 MockBluetoothAdapter::~MockBluetoothAdapter() {} | 10 MockBluetoothAdapter::~MockBluetoothAdapter() {} |
11 | 11 |
| 12 void MockBluetoothAdapter::SetLocalOutOfBandPairingData( |
| 13 BluetoothOutOfBandPairingData* data) { |
| 14 local_oob_data_ = data; |
| 15 } |
| 16 |
| 17 void MockBluetoothAdapter::ReadLocalOutOfBandPairingData( |
| 18 const BluetoothOutOfBandClient::DataCallback& callback) const { |
| 19 callback.Run(*local_oob_data_, (local_oob_data_ != NULL)); |
| 20 } |
| 21 |
12 } // namespace chromeos | 22 } // namespace chromeos |
OLD | NEW |