| Index: chromeos/network/network_state_handler.h
|
| diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h
|
| index 3265b00141c167c6fb162db3ff6a8bcd7cd1ba88..b35887bd5aa6f0629d9fa06fe540d20476548414 100644
|
| --- a/chromeos/network/network_state_handler.h
|
| +++ b/chromeos/network/network_state_handler.h
|
| @@ -112,6 +112,17 @@ class CHROMEOS_EXPORT NetworkStateHandler
|
| bool enabled,
|
| const network_handler::ErrorCallback& error_callback);
|
|
|
| + // Sets the tether technology state. Because Tether networks do not represent
|
| + // real Shill networks, this value must be set by the tether component rather
|
| + // than being generated by Shill. See TetherDeviceStateManager for more
|
| + // details.
|
| + void SetTetherTechnologyState(TechnologyState technology_state);
|
| +
|
| + // Sets the scanning state of the tether technology. Since tether network
|
| + // scans are not actually performed as part of Shill, this value must be set
|
| + // by the tether component.
|
| + void SetTetherScanState(bool is_scanning);
|
| +
|
| // Asynchronously sets the list of prohibited technologies. The accepted
|
| // values are the shill network technology identifiers. See also
|
| // chromeos::onc::Validator::ValidateGlobalNetworkConfiguration().
|
| @@ -250,7 +261,9 @@ class CHROMEOS_EXPORT NetworkStateHandler
|
| DeviceStateList* list) const;
|
|
|
| // Requests a network scan. This may trigger updates to the network
|
| - // list, which will trigger the appropriate observer calls.
|
| + // list, which will trigger the appropriate observer calls. Note that this
|
| + // function does not request a tether scan.
|
| + // TODO(khorimoto): Add ability to request a tether scan as well.
|
| void RequestScan() const;
|
|
|
| // Requests an update for an existing NetworkState, e.g. after configuring
|
| @@ -259,7 +272,7 @@ class CHROMEOS_EXPORT NetworkStateHandler
|
| // acknowledged it (e.g. in the callback of a SetProperties).
|
| // When the properties are received, NetworkPropertiesUpdated will be
|
| // signaled for each member of |observers_|, regardless of whether any
|
| - // properties actually changed.
|
| + // properties actually changed. Note that this is a no-op for Tether networks.
|
| void RequestUpdateForNetwork(const std::string& service_path);
|
|
|
| // Informs NetworkStateHandler to notify observers that the properties for
|
| @@ -452,6 +465,11 @@ class CHROMEOS_EXPORT NetworkStateHandler
|
| const std::string& guid,
|
| const std::string& connection_state);
|
|
|
| + // Ensures that the Tether DeviceState is present in |device_list_| if
|
| + // |tether_technology_state_| is not TECHNOLOGY_UNAVAILABLE and ensures that
|
| + // it is not present in |device_list_| if it is TECHNOLOGY_UNAVAILABLE.
|
| + void EnsureTetherDeviceState();
|
| +
|
| // Shill property handler instance, owned by this class.
|
| std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_;
|
|
|
| @@ -482,6 +500,11 @@ class CHROMEOS_EXPORT NetworkStateHandler
|
| // NetworkState that is not saved in a profile.
|
| SpecifierGuidMap specifier_guid_map_;
|
|
|
| + // The state corresponding to the tether device type. This value is managed by
|
| + // the tether component.
|
| + TechnologyState tether_technology_state_ =
|
| + TechnologyState::TECHNOLOGY_UNAVAILABLE;
|
| +
|
| // Ensure that Shutdown() gets called exactly once.
|
| bool did_shutdown_ = false;
|
|
|
|
|