| Index: chromeos/components/tether/host_scan_cache.cc
|
| diff --git a/chromeos/components/tether/host_scan_cache.cc b/chromeos/components/tether/host_scan_cache.cc
|
| index c059aebe095dd932b3f3b7da58ad1ec1914e107f..51696431e1996a6f94e4e69fa1386fee8362e6ad 100644
|
| --- a/chromeos/components/tether/host_scan_cache.cc
|
| +++ b/chromeos/components/tether/host_scan_cache.cc
|
| @@ -41,7 +41,8 @@ void HostScanCache::SetHostScanResult(const std::string& tether_network_guid,
|
| const std::string& device_name,
|
| const std::string& carrier,
|
| int battery_percentage,
|
| - int signal_strength) {
|
| + int signal_strength,
|
| + bool setup_required) {
|
| DCHECK(!tether_network_guid.empty());
|
|
|
| auto found_iter = tether_guid_to_timer_map_.find(tether_network_guid);
|
| @@ -72,6 +73,11 @@ void HostScanCache::SetHostScanResult(const std::string& tether_network_guid,
|
| << "new signal strength: " << signal_strength;
|
| }
|
|
|
| + if (setup_required)
|
| + setup_required_tether_guids_.insert(tether_network_guid);
|
| + else
|
| + setup_required_tether_guids_.erase(tether_network_guid);
|
| +
|
| StartTimer(tether_network_guid);
|
| }
|
|
|
| @@ -95,6 +101,7 @@ bool HostScanCache::RemoveHostScanResult(
|
| }
|
|
|
| tether_guid_to_timer_map_.erase(it);
|
| + setup_required_tether_guids_.erase(tether_network_guid);
|
| return network_state_handler_->RemoveTetherNetworkState(tether_network_guid);
|
| }
|
|
|
| @@ -133,6 +140,12 @@ void HostScanCache::ClearCacheExceptForActiveHost() {
|
| }
|
| }
|
|
|
| +bool HostScanCache::DoesHostRequireSetup(
|
| + const std::string& tether_network_guid) {
|
| + return setup_required_tether_guids_.find(tether_network_guid) !=
|
| + setup_required_tether_guids_.end();
|
| +}
|
| +
|
| void HostScanCache::OnPreviouslyConnectedHostIdsChanged() {
|
| for (auto& map_entry : tether_guid_to_timer_map_) {
|
| const std::string& tether_network_guid = map_entry.first;
|
|
|