| 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/initializer.h" | 5 #include "chromeos/components/tether/initializer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chromeos/components/tether/active_host.h" | 8 #include "chromeos/components/tether/active_host.h" |
| 9 #include "chromeos/components/tether/active_host_network_state_updater.h" | 9 #include "chromeos/components/tether/active_host_network_state_updater.h" |
| 10 #include "chromeos/components/tether/ble_connection_manager.h" | 10 #include "chromeos/components/tether/ble_connection_manager.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 base::MakeUnique<LocalDeviceDataProvider>(cryptauth_service_); | 176 base::MakeUnique<LocalDeviceDataProvider>(cryptauth_service_); |
| 177 remote_beacon_seed_fetcher_ = | 177 remote_beacon_seed_fetcher_ = |
| 178 base::MakeUnique<cryptauth::RemoteBeaconSeedFetcher>( | 178 base::MakeUnique<cryptauth::RemoteBeaconSeedFetcher>( |
| 179 cryptauth_service_->GetCryptAuthDeviceManager()); | 179 cryptauth_service_->GetCryptAuthDeviceManager()); |
| 180 ble_connection_manager_ = base::MakeUnique<BleConnectionManager>( | 180 ble_connection_manager_ = base::MakeUnique<BleConnectionManager>( |
| 181 cryptauth_service_, adapter, local_device_data_provider_.get(), | 181 cryptauth_service_, adapter, local_device_data_provider_.get(), |
| 182 remote_beacon_seed_fetcher_.get(), | 182 remote_beacon_seed_fetcher_.get(), |
| 183 cryptauth::BluetoothThrottlerImpl::GetInstance()); | 183 cryptauth::BluetoothThrottlerImpl::GetInstance()); |
| 184 tether_host_response_recorder_ = | 184 tether_host_response_recorder_ = |
| 185 base::MakeUnique<TetherHostResponseRecorder>(pref_service_); | 185 base::MakeUnique<TetherHostResponseRecorder>(pref_service_); |
| 186 device_id_tether_network_guid_map_ = |
| 187 base::MakeUnique<DeviceIdTetherNetworkGuidMap>(); |
| 186 host_scan_device_prioritizer_ = base::MakeUnique<HostScanDevicePrioritizer>( | 188 host_scan_device_prioritizer_ = base::MakeUnique<HostScanDevicePrioritizer>( |
| 187 tether_host_response_recorder_.get()); | 189 network_state_handler_, tether_host_response_recorder_.get(), |
| 190 device_id_tether_network_guid_map_.get()); |
| 188 wifi_hotspot_connector_ = base::MakeUnique<WifiHotspotConnector>( | 191 wifi_hotspot_connector_ = base::MakeUnique<WifiHotspotConnector>( |
| 189 network_state_handler_, network_connect_); | 192 network_state_handler_, network_connect_); |
| 190 active_host_ = | 193 active_host_ = |
| 191 base::MakeUnique<ActiveHost>(tether_host_fetcher_.get(), pref_service_); | 194 base::MakeUnique<ActiveHost>(tether_host_fetcher_.get(), pref_service_); |
| 192 active_host_network_state_updater_ = | 195 active_host_network_state_updater_ = |
| 193 base::MakeUnique<ActiveHostNetworkStateUpdater>(active_host_.get(), | 196 base::MakeUnique<ActiveHostNetworkStateUpdater>(active_host_.get(), |
| 194 network_state_handler_); | 197 network_state_handler_); |
| 195 device_id_tether_network_guid_map_ = | |
| 196 base::MakeUnique<DeviceIdTetherNetworkGuidMap>(); | |
| 197 host_scan_cache_ = base::MakeUnique<HostScanCache>( | 198 host_scan_cache_ = base::MakeUnique<HostScanCache>( |
| 198 network_state_handler_, active_host_.get(), | 199 network_state_handler_, active_host_.get(), |
| 199 tether_host_response_recorder_.get(), | 200 tether_host_response_recorder_.get(), |
| 200 device_id_tether_network_guid_map_.get()); | 201 device_id_tether_network_guid_map_.get()); |
| 201 keep_alive_scheduler_ = base::MakeUnique<KeepAliveScheduler>( | 202 keep_alive_scheduler_ = base::MakeUnique<KeepAliveScheduler>( |
| 202 active_host_.get(), ble_connection_manager_.get(), host_scan_cache_.get(), | 203 active_host_.get(), ble_connection_manager_.get(), host_scan_cache_.get(), |
| 203 device_id_tether_network_guid_map_.get()); | 204 device_id_tether_network_guid_map_.get()); |
| 204 clock_ = base::MakeUnique<base::DefaultClock>(); | 205 clock_ = base::MakeUnique<base::DefaultClock>(); |
| 205 host_scanner_ = base::MakeUnique<HostScanner>( | 206 host_scanner_ = base::MakeUnique<HostScanner>( |
| 206 tether_host_fetcher_.get(), ble_connection_manager_.get(), | 207 tether_host_fetcher_.get(), ble_connection_manager_.get(), |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 240 |
| 240 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( | 241 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( |
| 241 device::BluetoothAdvertisement::ErrorCode status) { | 242 device::BluetoothAdvertisement::ErrorCode status) { |
| 242 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " | 243 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " |
| 243 << "cannot use tether feature. Error code: " << status; | 244 << "cannot use tether feature. Error code: " << status; |
| 244 } | 245 } |
| 245 | 246 |
| 246 } // namespace tether | 247 } // namespace tether |
| 247 | 248 |
| 248 } // namespace chromeos | 249 } // namespace chromeos |
| OLD | NEW |