Index: chromeos/components/tether/host_scan_cache.h |
diff --git a/chromeos/components/tether/host_scan_cache.h b/chromeos/components/tether/host_scan_cache.h |
index d3ab465f869cea1b7f0779ab50469a7ce4d237f4..0fc99ab9be28eeda33cc8d10c2a59310d5fdb5c5 100644 |
--- a/chromeos/components/tether/host_scan_cache.h |
+++ b/chromeos/components/tether/host_scan_cache.h |
@@ -57,11 +57,15 @@ class HostScanCache : public TetherHostResponseRecorder::Observer { |
// Note: |signal_strength| should be in the range [0, 100]. This is different |
// from the |connection_strength| field received in ConnectTetheringResponse |
// and KeepAliveTickleResponse messages (the range is [0, 4] in those cases). |
+ // |battery_percentage| should also be in the range [0, 100]. |
+ // |setup_required| indicates that the host device requires first-time setup, |
+ // i.e. user interaction to allow tethering. |
Kyle Horimoto
2017/05/31 23:01:19
supernit: "i.e.," (comma after)
Same below.
Ryan Hansberry
2017/06/01 01:07:51
Done.
|
virtual void 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); |
// Removes the scan result with GUID |tether_network_guid| from the cache. If |
// no cache result with that GUID was present in the cache, this function is |
@@ -73,6 +77,10 @@ class HostScanCache : public TetherHostResponseRecorder::Observer { |
// connecting/connected to ensure the UI is up to date. |
virtual void ClearCacheExceptForActiveHost(); |
+ // Returns true if the host device requires first-time setup, i.e. user |
+ // interaction to allow tethering. |
+ virtual bool DoesHostRequireSetup(const std::string& tether_network_guid); |
+ |
// TetherHostResponseRecorder::Observer: |
void OnPreviouslyConnectedHostIdsChanged() override; |
@@ -103,6 +111,7 @@ class HostScanCache : public TetherHostResponseRecorder::Observer { |
// host). |
std::unordered_map<std::string, std::unique_ptr<base::Timer>> |
tether_guid_to_timer_map_; |
+ std::unordered_set<std::string> setup_required_tether_guids_; |
base::WeakPtrFactory<HostScanCache> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(HostScanCache); |