| 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/ble_connection_manager.h" | 5 #include "chromeos/components/tether/ble_connection_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/timer/mock_timer.h" | 8 #include "base/timer/mock_timer.h" |
| 9 #include "chromeos/components/tether/ble_constants.h" | 9 #include "chromeos/components/tether/ble_constants.h" |
| 10 #include "chromeos/components/tether/proto/tether.pb.h" | 10 #include "chromeos/components/tether/proto/tether.pb.h" |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 .WillByDefault(Return(true)); | 265 .WillByDefault(Return(true)); |
| 266 | 266 |
| 267 device_queue_ = new BleAdvertisementDeviceQueue(); | 267 device_queue_ = new BleAdvertisementDeviceQueue(); |
| 268 mock_timer_factory_ = new MockTimerFactory(); | 268 mock_timer_factory_ = new MockTimerFactory(); |
| 269 mock_bluetooth_throttler_ = base::WrapUnique(new MockBluetoothThrottler()); | 269 mock_bluetooth_throttler_ = base::WrapUnique(new MockBluetoothThrottler()); |
| 270 | 270 |
| 271 fake_connection_factory_ = base::WrapUnique(new FakeConnectionFactory( | 271 fake_connection_factory_ = base::WrapUnique(new FakeConnectionFactory( |
| 272 mock_adapter_, device::BluetoothUUID(std::string(kGattServerUuid)), | 272 mock_adapter_, device::BluetoothUUID(std::string(kGattServerUuid)), |
| 273 mock_bluetooth_throttler_.get())); | 273 mock_bluetooth_throttler_.get())); |
| 274 cryptauth::weave::BluetoothLowEnergyWeaveClientConnection::Factory:: | 274 cryptauth::weave::BluetoothLowEnergyWeaveClientConnection::Factory:: |
| 275 SetInstanceForTesting(std::move(fake_connection_factory_)); | 275 SetInstanceForTesting(fake_connection_factory_.get()); |
| 276 | 276 |
| 277 fake_secure_channel_factory_ = | 277 fake_secure_channel_factory_ = |
| 278 base::WrapUnique(new FakeSecureChannelFactory()); | 278 base::WrapUnique(new FakeSecureChannelFactory()); |
| 279 cryptauth::SecureChannel::Factory::SetInstanceForTesting( | 279 cryptauth::SecureChannel::Factory::SetInstanceForTesting( |
| 280 fake_secure_channel_factory_.get()); | 280 fake_secure_channel_factory_.get()); |
| 281 | 281 |
| 282 manager_ = base::WrapUnique(new BleConnectionManager( | 282 manager_ = base::WrapUnique(new BleConnectionManager( |
| 283 fake_cryptauth_service_.get(), mock_adapter_, | 283 fake_cryptauth_service_.get(), mock_adapter_, |
| 284 base::WrapUnique(mock_ble_scanner_), | 284 base::WrapUnique(mock_ble_scanner_), |
| 285 base::WrapUnique(mock_ble_advertiser_), base::WrapUnique(device_queue_), | 285 base::WrapUnique(mock_ble_advertiser_), base::WrapUnique(device_queue_), |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 cryptauth::SecureChannel::Status::DISCONNECTED}, | 1211 cryptauth::SecureChannel::Status::DISCONNECTED}, |
| 1212 {test_devices_[1], cryptauth::SecureChannel::Status::CONNECTING, | 1212 {test_devices_[1], cryptauth::SecureChannel::Status::CONNECTING, |
| 1213 cryptauth::SecureChannel::Status::DISCONNECTED}, | 1213 cryptauth::SecureChannel::Status::DISCONNECTED}, |
| 1214 {test_devices_[2], cryptauth::SecureChannel::Status::CONNECTING, | 1214 {test_devices_[2], cryptauth::SecureChannel::Status::CONNECTING, |
| 1215 cryptauth::SecureChannel::Status::DISCONNECTED}}); | 1215 cryptauth::SecureChannel::Status::DISCONNECTED}}); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 } // namespace tether | 1218 } // namespace tether |
| 1219 | 1219 |
| 1220 } // namespace cryptauth | 1220 } // namespace cryptauth |
| OLD | NEW |