OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chromeos/components/tether/fake_ble_connection_manager.h" | 5 #include "chromeos/components/tether/fake_ble_connection_manager.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 namespace tether { | 9 namespace tether { |
10 | 10 |
11 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: | 11 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: |
12 StatusAndRegisteredMessageTypes() | 12 StatusAndRegisteredMessageTypes() |
13 : status(cryptauth::SecureChannel::Status::DISCONNECTED) {} | 13 : status(cryptauth::SecureChannel::Status::DISCONNECTED) {} |
14 | 14 |
15 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: | 15 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: |
16 StatusAndRegisteredMessageTypes( | 16 StatusAndRegisteredMessageTypes( |
17 const StatusAndRegisteredMessageTypes& other) | 17 const StatusAndRegisteredMessageTypes& other) |
18 : status(other.status), | 18 : status(other.status), |
19 registered_message_types(other.registered_message_types) {} | 19 registered_message_types(other.registered_message_types) {} |
20 | 20 |
21 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: | 21 FakeBleConnectionManager::StatusAndRegisteredMessageTypes:: |
22 ~StatusAndRegisteredMessageTypes() {} | 22 ~StatusAndRegisteredMessageTypes() {} |
23 | 23 |
24 FakeBleConnectionManager::FakeBleConnectionManager() | 24 FakeBleConnectionManager::FakeBleConnectionManager() |
25 : BleConnectionManager(nullptr, nullptr, nullptr, nullptr, nullptr) {} | 25 : BleConnectionManager(nullptr, |
| 26 nullptr, |
| 27 nullptr, |
| 28 nullptr, |
| 29 nullptr, |
| 30 nullptr, |
| 31 nullptr) {} |
26 | 32 |
27 FakeBleConnectionManager::~FakeBleConnectionManager() {} | 33 FakeBleConnectionManager::~FakeBleConnectionManager() {} |
28 | 34 |
29 void FakeBleConnectionManager::SetDeviceStatus( | 35 void FakeBleConnectionManager::SetDeviceStatus( |
30 const cryptauth::RemoteDevice& remote_device, | 36 const cryptauth::RemoteDevice& remote_device, |
31 const cryptauth::SecureChannel::Status& status) { | 37 const cryptauth::SecureChannel::Status& status) { |
32 const auto iter = device_map_.find(remote_device); | 38 const auto iter = device_map_.find(remote_device); |
33 DCHECK(iter != device_map_.end()); | 39 DCHECK(iter != device_map_.end()); |
34 | 40 |
35 cryptauth::SecureChannel::Status old_status = iter->second.status; | 41 cryptauth::SecureChannel::Status old_status = iter->second.status; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 return false; | 86 return false; |
81 } | 87 } |
82 | 88 |
83 *status = iter->second.status; | 89 *status = iter->second.status; |
84 return true; | 90 return true; |
85 } | 91 } |
86 | 92 |
87 } // namespace tether | 93 } // namespace tether |
88 | 94 |
89 } // namespace chromeos | 95 } // namespace chromeos |
OLD | NEW |