Index: chromeos/network/network_state_handler.h |
diff --git a/chromeos/network/network_state_handler.h b/chromeos/network/network_state_handler.h |
index 34bac738572f970ef44d7156d1aaa3b870bca3f7..ddb170d01b415c494b861c9182fe2bdfeb0731f7 100644 |
--- a/chromeos/network/network_state_handler.h |
+++ b/chromeos/network/network_state_handler.h |
@@ -208,20 +208,32 @@ class CHROMEOS_EXPORT NetworkStateHandler |
// refer to and fetch this NetworkState in the future. |
// NOTE: only GetNetworkStateFromGuid is supported to fetch "tether" |
// NetworkStates. |
- void AddTetherNetworkState(const std::string& guid, const std::string& name); |
+ void AddTetherNetworkState(const std::string& guid, |
+ const std::string& name, |
+ const std::string& carrier, |
+ int battery_percentage, |
+ int signal_strength); |
+ |
+ // Updates the tether properties (carrier, battery percentage, and signal |
+ // strength) for a network which has already been added via |
+ // AddTetherNetworkState. Returns whether the update was successful. |
+ bool UpdateTetherNetworkProperties(const std::string& guid, |
+ const std::string& carrier, |
+ int battery_percentage, |
+ int signal_strength); |
// Remove a Tether NetworkState, using the same |guid| passed to |
// AddTetherNetworkState. |
void RemoveTetherNetworkState(const std::string& guid); |
// Inform NetworkStateHandler that the provided Tether network with the |
- // provided guid |tether_guid| is associated with the Wi-Fi network with the |
- // provided guid |wifi_ssid|. This Wi-Fi network can now be hidden in the UI, |
- // and the Tether network will act as its proxy. Returns false if the |
- // association failed (e.g. one or both networks don't exist). |
+ // provided guid |tether_network_guid| is associated with the Wi-Fi network |
+ // with the provided guid |wifi_network_guid|. This Wi-Fi network can now be |
+ // hidden in the UI, and the Tether network will act as its proxy. Returns |
+ // false if the association failed (e.g., one or both networks don't exist). |
bool AssociateTetherNetworkStateWithWifiNetwork( |
const std::string& tether_network_guid, |
- const std::string& wifi_network_ssid); |
+ const std::string& wifi_network_guid); |
// Set the connection_state of the Tether NetworkState corresponding to the |
// provided |guid| to "Disconnected". This will be reflected in the UI. |
@@ -434,6 +446,12 @@ class CHROMEOS_EXPORT NetworkStateHandler |
std::vector<std::string> GetTechnologiesForType( |
const NetworkTypePattern& type) const; |
+ // Set the connection_state of a Tether NetworkState corresponding to the |
+ // provided |guid|. |
+ void SetTetherNetworkStateConnectionState( |
+ const std::string& guid, |
+ const std::string& connection_state); |
+ |
// Shill property handler instance, owned by this class. |
std::unique_ptr<internal::ShillPropertyHandler> shill_property_handler_; |
@@ -467,12 +485,6 @@ class CHROMEOS_EXPORT NetworkStateHandler |
// Ensure that Shutdown() gets called exactly once. |
bool did_shutdown_ = false; |
- // Set the |connection_state| of a Tether NetworkState corresponding to the |
- // provided |guid|. |
- void SetTetherNetworkStateConnectionState( |
- const std::string& guid, |
- const std::string& connection_state); |
- |
DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); |
}; |