Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: chrome/browser/chromeos/tether/tether_service.h

Issue 2961733002: [CrOS Tether] Remove spammy log from Initializer. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/tether/tether_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4a174b00a20d375c92b4ef6fd7cb37efb5ccacf1 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,24 @@ class TetherService : public KeyedService,
// Stop the Tether module.
virtual void StopTether();
+ // Delegate used to call the static functions of Initializer. Injected to
+ // aid in testing.
+ class InitializerDelegate {
+ 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 +142,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 +157,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_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/tether/tether_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698