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

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

Issue 2852693004: [CrOS Tether] Create HostScanCache, which caches scan results and inserts them into the network sta… (Closed)
Patch Set: Fixed comment, added tests for TestHostResponseRecorder::Observer. 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
Index: chromeos/components/tether/initializer.cc
diff --git a/chromeos/components/tether/initializer.cc b/chromeos/components/tether/initializer.cc
index f27621fc5dee7cd1229888bce53dfac700ab7b7f..a09b0744d2b0d0e51282086eaa4a6354bd1f4ba1 100644
--- a/chromeos/components/tether/initializer.cc
+++ b/chromeos/components/tether/initializer.cc
@@ -9,6 +9,7 @@
#include "chromeos/components/tether/active_host_network_state_updater.h"
#include "chromeos/components/tether/ble_connection_manager.h"
#include "chromeos/components/tether/device_id_tether_network_guid_map.h"
+#include "chromeos/components/tether/host_scan_cache.h"
#include "chromeos/components/tether/host_scan_device_prioritizer.h"
#include "chromeos/components/tether/host_scan_scheduler.h"
#include "chromeos/components/tether/host_scanner.h"
@@ -206,11 +207,15 @@ void Initializer::OnBluetoothAdapterAdvertisingIntervalSet(
base::MakeUnique<TetherNetworkDisconnectionHandler>(
active_host_.get(), network_state_handler_,
network_configuration_remover_.get());
+ host_scan_cache_ = base::MakeUnique<HostScanCache>(
+ network_state_handler_, active_host_.get(),
+ tether_host_response_recorder_.get(),
+ device_id_tether_network_guid_map_.get());
host_scanner_ = base::MakeUnique<HostScanner>(
tether_host_fetcher_.get(), ble_connection_manager_.get(),
host_scan_device_prioritizer_.get(), tether_host_response_recorder_.get(),
- network_state_handler_, notification_presenter_.get(),
- device_id_tether_network_guid_map_.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.

Powered by Google App Engine
This is Rietveld 408576698