| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 void Initializer::Shutdown() { | 73 void Initializer::Shutdown() { |
| 74 if (instance_) { | 74 if (instance_) { |
| 75 PA_LOG(INFO) << "Shutting down tether feature."; | 75 PA_LOG(INFO) << "Shutting down tether feature."; |
| 76 delete instance_; | 76 delete instance_; |
| 77 instance_ = nullptr; | 77 instance_ = nullptr; |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 // static |
| 82 void Initializer::RegisterProfilePrefs(PrefRegistrySimple* registry) { |
| 83 ActiveHost::RegisterPrefs(registry); |
| 84 HostScanDevicePrioritizer::RegisterPrefs(registry); |
| 85 } |
| 86 |
| 81 Initializer::Initializer( | 87 Initializer::Initializer( |
| 82 cryptauth::CryptAuthService* cryptauth_service, | 88 cryptauth::CryptAuthService* cryptauth_service, |
| 83 std::unique_ptr<NotificationPresenter> notification_presenter, | 89 std::unique_ptr<NotificationPresenter> notification_presenter, |
| 84 PrefService* pref_service, | 90 PrefService* pref_service, |
| 85 ProfileOAuth2TokenService* token_service, | 91 ProfileOAuth2TokenService* token_service, |
| 86 NetworkStateHandler* network_state_handler, | 92 NetworkStateHandler* network_state_handler, |
| 87 NetworkConnect* network_connect) | 93 NetworkConnect* network_connect) |
| 88 : cryptauth_service_(cryptauth_service), | 94 : cryptauth_service_(cryptauth_service), |
| 89 notification_presenter_(std::move(notification_presenter)), | 95 notification_presenter_(std::move(notification_presenter)), |
| 90 pref_service_(pref_service), | 96 pref_service_(pref_service), |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 191 |
| 186 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( | 192 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( |
| 187 device::BluetoothAdvertisement::ErrorCode status) { | 193 device::BluetoothAdvertisement::ErrorCode status) { |
| 188 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " | 194 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " |
| 189 << "cannot use tether feature. Error code: " << status; | 195 << "cannot use tether feature. Error code: " << status; |
| 190 } | 196 } |
| 191 | 197 |
| 192 } // namespace tether | 198 } // namespace tether |
| 193 | 199 |
| 194 } // namespace chromeos | 200 } // namespace chromeos |
| OLD | NEW |