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

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

Issue 2870393003: Tether: only scan when asked to by NetworkStateHandler. (Closed)
Patch Set: Remove incorrect call in ~HostScanScheduler() Created 3 years, 7 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
Index: chromeos/components/tether/initializer.cc
diff --git a/chromeos/components/tether/initializer.cc b/chromeos/components/tether/initializer.cc
index 4faa3296693f9b9d9c32e657188c26a531235e49..95e4822e82f35a3fdb2c73da06e9fb21356f7348 100644
--- a/chromeos/components/tether/initializer.cc
+++ b/chromeos/components/tether/initializer.cc
@@ -218,15 +218,14 @@ void Initializer::OnBluetoothAdapterAdvertisingIntervalSet(
network_state_handler_, active_host_.get(),
tether_host_response_recorder_.get(),
device_id_tether_network_guid_map_.get());
+ clock_ = base::MakeUnique<base::DefaultClock>();
host_scanner_ = base::MakeUnique<HostScanner>(
tether_host_fetcher_.get(), ble_connection_manager_.get(),
host_scan_device_prioritizer_.get(), tether_host_response_recorder_.get(),
notification_presenter_.get(), device_id_tether_network_guid_map_.get(),
- host_scan_cache_.get());
-
- // TODO(khorimoto): Hook up HostScanScheduler. Currently, we simply start a
- // new scan once the user logs in.
- host_scanner_->StartScan();
+ host_scan_cache_.get(), clock_.get());
+ host_scan_scheduler_ = base::MakeUnique<HostScanScheduler>(
+ network_state_handler_, host_scanner_.get());
}
void Initializer::OnBluetoothAdapterAdvertisingIntervalError(

Powered by Google App Engine
This is Rietveld 408576698