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" |
11 #include "chromeos/components/tether/device_id_tether_network_guid_map.h" | 11 #include "chromeos/components/tether/device_id_tether_network_guid_map.h" |
12 #include "chromeos/components/tether/host_scan_cache.h" | 12 #include "chromeos/components/tether/host_scan_cache.h" |
13 #include "chromeos/components/tether/host_scan_device_prioritizer_impl.h" | 13 #include "chromeos/components/tether/host_scan_device_prioritizer_impl.h" |
14 #include "chromeos/components/tether/host_scan_scheduler.h" | 14 #include "chromeos/components/tether/host_scan_scheduler.h" |
15 #include "chromeos/components/tether/host_scanner.h" | 15 #include "chromeos/components/tether/host_scanner.h" |
16 #include "chromeos/components/tether/keep_alive_scheduler.h" | 16 #include "chromeos/components/tether/keep_alive_scheduler.h" |
17 #include "chromeos/components/tether/local_device_data_provider.h" | |
18 #include "chromeos/components/tether/network_configuration_remover.h" | 17 #include "chromeos/components/tether/network_configuration_remover.h" |
19 #include "chromeos/components/tether/network_connection_handler_tether_delegate.
h" | 18 #include "chromeos/components/tether/network_connection_handler_tether_delegate.
h" |
20 #include "chromeos/components/tether/notification_presenter.h" | 19 #include "chromeos/components/tether/notification_presenter.h" |
21 #include "chromeos/components/tether/tether_connector.h" | 20 #include "chromeos/components/tether/tether_connector.h" |
22 #include "chromeos/components/tether/tether_disconnector.h" | 21 #include "chromeos/components/tether/tether_disconnector.h" |
23 #include "chromeos/components/tether/tether_host_fetcher.h" | 22 #include "chromeos/components/tether/tether_host_fetcher.h" |
24 #include "chromeos/components/tether/tether_host_response_recorder.h" | 23 #include "chromeos/components/tether/tether_host_response_recorder.h" |
25 #include "chromeos/components/tether/tether_network_disconnection_handler.h" | 24 #include "chromeos/components/tether/tether_network_disconnection_handler.h" |
26 #include "chromeos/components/tether/wifi_hotspot_connector.h" | 25 #include "chromeos/components/tether/wifi_hotspot_connector.h" |
27 #include "chromeos/network/managed_network_configuration_handler.h" | 26 #include "chromeos/network/managed_network_configuration_handler.h" |
28 #include "chromeos/network/network_connect.h" | 27 #include "chromeos/network/network_connect.h" |
29 #include "chromeos/network/network_connection_handler.h" | 28 #include "chromeos/network/network_connection_handler.h" |
30 #include "chromeos/network/network_state_handler.h" | 29 #include "chromeos/network/network_state_handler.h" |
31 #include "components/cryptauth/bluetooth_throttler_impl.h" | 30 #include "components/cryptauth/bluetooth_throttler_impl.h" |
32 #include "components/cryptauth/cryptauth_service.h" | 31 #include "components/cryptauth/cryptauth_service.h" |
| 32 #include "components/cryptauth/local_device_data_provider.h" |
33 #include "components/cryptauth/remote_beacon_seed_fetcher.h" | 33 #include "components/cryptauth/remote_beacon_seed_fetcher.h" |
34 #include "components/prefs/pref_service.h" | 34 #include "components/prefs/pref_service.h" |
35 #include "components/proximity_auth/logging/logging.h" | 35 #include "components/proximity_auth/logging/logging.h" |
36 #include "device/bluetooth/bluetooth_adapter.h" | 36 #include "device/bluetooth/bluetooth_adapter.h" |
37 #include "device/bluetooth/bluetooth_adapter_factory.h" | 37 #include "device/bluetooth/bluetooth_adapter_factory.h" |
38 | 38 |
39 namespace chromeos { | 39 namespace chromeos { |
40 | 40 |
41 namespace tether { | 41 namespace tether { |
42 | 42 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 void Initializer::OnBluetoothAdapterAdvertisingIntervalSet( | 169 void Initializer::OnBluetoothAdapterAdvertisingIntervalSet( |
170 scoped_refptr<device::BluetoothAdapter> adapter) { | 170 scoped_refptr<device::BluetoothAdapter> adapter) { |
171 PA_LOG(INFO) << "Successfully set Bluetooth advertisement interval. " | 171 PA_LOG(INFO) << "Successfully set Bluetooth advertisement interval. " |
172 << "Initializing tether feature."; | 172 << "Initializing tether feature."; |
173 | 173 |
174 tether_host_fetcher_ = | 174 tether_host_fetcher_ = |
175 base::MakeUnique<TetherHostFetcher>(cryptauth_service_); | 175 base::MakeUnique<TetherHostFetcher>(cryptauth_service_); |
176 local_device_data_provider_ = | 176 local_device_data_provider_ = |
177 base::MakeUnique<LocalDeviceDataProvider>(cryptauth_service_); | 177 base::MakeUnique<cryptauth::LocalDeviceDataProvider>(cryptauth_service_); |
178 remote_beacon_seed_fetcher_ = | 178 remote_beacon_seed_fetcher_ = |
179 base::MakeUnique<cryptauth::RemoteBeaconSeedFetcher>( | 179 base::MakeUnique<cryptauth::RemoteBeaconSeedFetcher>( |
180 cryptauth_service_->GetCryptAuthDeviceManager()); | 180 cryptauth_service_->GetCryptAuthDeviceManager()); |
181 ble_connection_manager_ = base::MakeUnique<BleConnectionManager>( | 181 ble_connection_manager_ = base::MakeUnique<BleConnectionManager>( |
182 cryptauth_service_, adapter, local_device_data_provider_.get(), | 182 cryptauth_service_, adapter, local_device_data_provider_.get(), |
183 remote_beacon_seed_fetcher_.get(), | 183 remote_beacon_seed_fetcher_.get(), |
184 cryptauth::BluetoothThrottlerImpl::GetInstance()); | 184 cryptauth::BluetoothThrottlerImpl::GetInstance()); |
185 tether_host_response_recorder_ = | 185 tether_host_response_recorder_ = |
186 base::MakeUnique<TetherHostResponseRecorder>(pref_service_); | 186 base::MakeUnique<TetherHostResponseRecorder>(pref_service_); |
187 device_id_tether_network_guid_map_ = | 187 device_id_tether_network_guid_map_ = |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( | 245 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( |
246 device::BluetoothAdvertisement::ErrorCode status) { | 246 device::BluetoothAdvertisement::ErrorCode status) { |
247 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " | 247 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " |
248 << "cannot use tether feature. Error code: " << status; | 248 << "cannot use tether feature. Error code: " << status; |
249 } | 249 } |
250 | 250 |
251 } // namespace tether | 251 } // namespace tether |
252 | 252 |
253 } // namespace chromeos | 253 } // namespace chromeos |
OLD | NEW |