OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chromeos/components/tether/ble_constants.h" | 7 #include "chromeos/components/tether/ble_constants.h" |
8 #include "components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.
h" | 8 #include "components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.
h" |
9 #include "components/cryptauth/cryptauth_service.h" | 9 #include "components/cryptauth/cryptauth_service.h" |
10 #include "components/proximity_auth/logging/logging.h" | 10 #include "components/proximity_auth/logging/logging.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 BleConnectionManager::BleConnectionManager( | 172 BleConnectionManager::BleConnectionManager( |
173 cryptauth::CryptAuthService* cryptauth_service, | 173 cryptauth::CryptAuthService* cryptauth_service, |
174 scoped_refptr<device::BluetoothAdapter> adapter, | 174 scoped_refptr<device::BluetoothAdapter> adapter, |
175 const LocalDeviceDataProvider* local_device_data_provider, | 175 const LocalDeviceDataProvider* local_device_data_provider, |
176 const cryptauth::RemoteBeaconSeedFetcher* remote_beacon_seed_fetcher, | 176 const cryptauth::RemoteBeaconSeedFetcher* remote_beacon_seed_fetcher, |
177 cryptauth::BluetoothThrottler* bluetooth_throttler) | 177 cryptauth::BluetoothThrottler* bluetooth_throttler) |
178 : BleConnectionManager( | 178 : BleConnectionManager( |
179 cryptauth_service, | 179 cryptauth_service, |
180 adapter, | 180 adapter, |
181 // TODO(khorimoto): Inject |adapter| into |BleScanner|. | 181 base::MakeUnique<BleScanner>(adapter, local_device_data_provider), |
182 base::MakeUnique<BleScanner>(local_device_data_provider), | |
183 base::MakeUnique<BleAdvertiser>(adapter, | 182 base::MakeUnique<BleAdvertiser>(adapter, |
184 local_device_data_provider, | 183 local_device_data_provider, |
185 remote_beacon_seed_fetcher), | 184 remote_beacon_seed_fetcher), |
186 base::MakeUnique<BleAdvertisementDeviceQueue>(), | 185 base::MakeUnique<BleAdvertisementDeviceQueue>(), |
187 base::WrapUnique<TimerFactory>(new TimerFactory()), | 186 base::WrapUnique<TimerFactory>(new TimerFactory()), |
188 bluetooth_throttler) {} | 187 bluetooth_throttler) {} |
189 | 188 |
190 BleConnectionManager::BleConnectionManager( | 189 BleConnectionManager::BleConnectionManager( |
191 cryptauth::CryptAuthService* cryptauth_service, | 190 cryptauth::CryptAuthService* cryptauth_service, |
192 scoped_refptr<device::BluetoothAdapter> adapter, | 191 scoped_refptr<device::BluetoothAdapter> adapter, |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 << cryptauth::SecureChannel::StatusToString(new_status); | 503 << cryptauth::SecureChannel::StatusToString(new_status); |
505 for (auto& observer : observer_list_) { | 504 for (auto& observer : observer_list_) { |
506 observer.OnSecureChannelStatusChanged(remote_device, old_status, | 505 observer.OnSecureChannelStatusChanged(remote_device, old_status, |
507 new_status); | 506 new_status); |
508 } | 507 } |
509 } | 508 } |
510 | 509 |
511 } // namespace tether | 510 } // namespace tether |
512 | 511 |
513 } // namespace chromeos | 512 } // namespace chromeos |
OLD | NEW |