Chromium Code Reviews| Index: chrome/browser/chromeos/tether/tether_service.h |
| diff --git a/chrome/browser/chromeos/tether/tether_service.h b/chrome/browser/chromeos/tether/tether_service.h |
| index 3a971355b86d3a0e36beb03015b3c4b266998932..cabe3983789280c422976aa843f85bb12b2eff1e 100644 |
| --- a/chrome/browser/chromeos/tether/tether_service.h |
| +++ b/chrome/browser/chromeos/tether/tether_service.h |
| @@ -19,12 +19,23 @@ |
| #include "components/prefs/pref_change_registrar.h" |
| #include "device/bluetooth/bluetooth_adapter.h" |
| +namespace chromeos { |
| +class NetworkStateHandler; |
| +class ManagedNetworkConfigurationHandler; |
| +class NetworkConnect; |
| +class NetworkConnectionHandler; |
| +namespace tether { |
| +class NotificationPresenter; |
| +} // namespace tether |
| +} // namespace chromeos |
| + |
| namespace cryptauth { |
| class CryptAuthService; |
| -} // cryptauth |
| +} // namespace cryptauth |
| class PrefRegistrySimple; |
| class Profile; |
| +class ProfileOAuth2TokenService; |
| class TetherService : public KeyedService, |
| public chromeos::PowerManagerClient::Observer, |
| @@ -57,6 +68,22 @@ class TetherService : public KeyedService, |
| // Stop the Tether module. |
| virtual void StopTether(); |
| + class InitializerDelegate { |
|
Ryan Hansberry
2017/06/28 17:02:40
Please add a comment that this is a necessary inst
Kyle Horimoto
2017/06/28 21:57:48
Done.
|
| + public: |
| + virtual void InitializeTether( |
| + cryptauth::CryptAuthService* cryptauth_service, |
| + std::unique_ptr<chromeos::tether::NotificationPresenter> |
| + notification_presenter, |
| + PrefService* pref_service, |
| + ProfileOAuth2TokenService* token_service, |
| + chromeos::NetworkStateHandler* network_state_handler, |
| + chromeos::ManagedNetworkConfigurationHandler* |
| + managed_network_configuration_handler, |
| + chromeos::NetworkConnect* network_connect, |
| + chromeos::NetworkConnectionHandler* network_connection_handler); |
| + virtual void ShutdownTether(); |
| + }; |
| + |
| protected: |
| // KeyedService: |
| void Shutdown() override; |
| @@ -113,6 +140,9 @@ class TetherService : public KeyedService, |
| // Whether Tether is enabled. |
| bool IsEnabledbyPreference() const; |
| + void SetInitializerDelegateForTest( |
| + std::unique_ptr<InitializerDelegate> initializer_delegate); |
| + |
| // Whether the service has been shut down. |
| bool shut_down_ = false; |
| @@ -125,6 +155,7 @@ class TetherService : public KeyedService, |
| chromeos::SessionManagerClient* session_manager_client_; |
| cryptauth::CryptAuthService* cryptauth_service_; |
| chromeos::NetworkStateHandler* network_state_handler_; |
| + std::unique_ptr<InitializerDelegate> initializer_delegate_; |
| PrefChangeRegistrar registrar_; |
| scoped_refptr<device::BluetoothAdapter> adapter_; |