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

Unified Diff: chromeos/components/tether/initializer.h

Issue 2801353002: [CrOS Tether] Fill out the Initializer class. Tether will now initialize fully once the flag is ena… (Closed)
Patch Set: hansberry@ comments, DEPS change. Created 3 years, 8 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 | « chromeos/components/tether/host_scanner_unittest.cc ('k') | chromeos/components/tether/initializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/components/tether/initializer.h
diff --git a/chromeos/components/tether/initializer.h b/chromeos/components/tether/initializer.h
index 76a98a972f601fb8fdc4d0d8154a543dacac24c6..9cf9920dc763958d3c77753ee24d2351272a9090 100644
--- a/chromeos/components/tether/initializer.h
+++ b/chromeos/components/tether/initializer.h
@@ -5,29 +5,89 @@
#ifndef CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_
#define CHROMEOS_COMPONENTS_TETHER_INITIALIZER_H_
+#include <memory>
+
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "components/prefs/pref_registry_simple.h"
Ryan Hansberry 2017/04/08 00:10:14 Remove this.
Kyle Horimoto 2017/04/08 00:30:27 Done.
+#include "components/signin/core/browser/profile_oauth2_token_service.h"
+#include "device/bluetooth/bluetooth_adapter.h"
+#include "device/bluetooth/bluetooth_advertisement.h"
+
+class PrefService;
namespace cryptauth {
class CryptAuthService;
+class RemoteBeaconSeedFetcher;
}
namespace chromeos {
namespace tether {
+class ActiveHost;
+class ActiveHostNetworkStateUpdater;
+class BleConnectionManager;
+class DeviceIdTetherNetworkGuidMap;
+class HostScanner;
+class HostScanDevicePrioritizer;
+class LocalDeviceDataProvider;
+class NotificationPresenter;
+class TetherConnector;
+class TetherHostFetcher;
+class WifiHotspotConnector;
+
// Initializes the Tether Chrome OS component.
-// TODO(khorimoto): Implement.
-class Initializer {
+class Initializer : public OAuth2TokenService::Observer {
public:
- static void Initialize(cryptauth::CryptAuthService* cryptauth_service);
+ static void Initialize(
+ cryptauth::CryptAuthService* cryptauth_service,
+ std::unique_ptr<NotificationPresenter> notification_presenter,
+ PrefService* pref_service,
+ ProfileOAuth2TokenService* token_service);
+
+ static void RegisterProfilePrefs(PrefRegistrySimple* registry);
Ryan Hansberry 2017/04/08 00:10:14 remove this.
Kyle Horimoto 2017/04/08 00:30:27 Done.
private:
static Initializer* instance_;
- explicit Initializer(cryptauth::CryptAuthService* cryptauth_service);
- ~Initializer();
+ Initializer(cryptauth::CryptAuthService* cryptauth_service,
+ std::unique_ptr<NotificationPresenter> notification_presenter,
+ PrefService* pref_service,
+ ProfileOAuth2TokenService* token_service);
+ ~Initializer() override;
+
+ // OAuth2TokenService::Observer:
+ void OnRefreshTokensLoaded() override;
+
+ void OnBluetoothAdapterFetched(
+ scoped_refptr<device::BluetoothAdapter> adapter);
+
+ void IntervalSuccessCallback();
+ void IntervalErrorCallback(device::BluetoothAdvertisement::ErrorCode status);
cryptauth::CryptAuthService* cryptauth_service_;
+ std::unique_ptr<NotificationPresenter> notification_presenter_;
+ PrefService* pref_service_;
+ ProfileOAuth2TokenService* token_service_;
+
+ std::unique_ptr<TetherHostFetcher> tether_host_fetcher_;
+ std::unique_ptr<LocalDeviceDataProvider> local_device_data_provider_;
+ std::unique_ptr<cryptauth::RemoteBeaconSeedFetcher>
+ remote_beacon_seed_fetcher_;
+ std::unique_ptr<BleConnectionManager> ble_connection_manager_;
+ std::unique_ptr<HostScanDevicePrioritizer> host_scan_device_prioritizer_;
+ std::unique_ptr<WifiHotspotConnector> wifi_hotspot_connector_;
+ std::unique_ptr<ActiveHost> active_host_;
+ std::unique_ptr<ActiveHostNetworkStateUpdater>
+ active_host_network_state_updater_;
+ std::unique_ptr<DeviceIdTetherNetworkGuidMap>
+ device_id_tether_network_guid_map_;
+ std::unique_ptr<TetherConnector> tether_connector_;
+ std::unique_ptr<HostScanner> host_scanner_;
+
+ base::WeakPtrFactory<Initializer> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(Initializer);
};
« no previous file with comments | « chromeos/components/tether/host_scanner_unittest.cc ('k') | chromeos/components/tether/initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698