| Index: chromeos/network/network_state_handler.cc
|
| diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc
|
| index 2ba68620e0c2b8b5d69b4918b7c68e68724d1b3d..b08ff069cee3cdaa9379c135d44d1ae5aa78149f 100644
|
| --- a/chromeos/network/network_state_handler.cc
|
| +++ b/chromeos/network/network_state_handler.cc
|
| @@ -594,13 +594,44 @@ bool NetworkStateHandler::RemoveTetherNetworkState(const std::string& guid) {
|
|
|
| tether_network_list_.erase(iter);
|
| NotifyNetworkListChanged();
|
| +
|
| return true;
|
| }
|
| }
|
| -
|
| return false;
|
| }
|
|
|
| +bool NetworkStateHandler::DisassociateTetherNetworkStateFromWifiNetwork(
|
| + const std::string& tether_network_guid) {
|
| + NetworkState* tether_network =
|
| + GetModifiableNetworkStateFromGuid(tether_network_guid);
|
| +
|
| + if (!tether_network) {
|
| + NET_LOG(ERROR) << "DisassociateTetherNetworkStateWithWifiNetwork(): Tether "
|
| + << "network with ID " << tether_network_guid
|
| + << " not registered; could not remove association.";
|
| + return false;
|
| + }
|
| +
|
| + std::string wifi_network_guid = tether_network->tether_guid();
|
| + NetworkState* wifi_network =
|
| + GetModifiableNetworkStateFromGuid(wifi_network_guid);
|
| +
|
| + if (!wifi_network) {
|
| + NET_LOG(ERROR) << "DisassociateTetherNetworkStateWithWifiNetwork(): Wi-Fi "
|
| + << "network with ID " << wifi_network_guid
|
| + << " not registered; could not remove association.";
|
| + return false;
|
| + }
|
| +
|
| + wifi_network->set_tether_guid(std::string());
|
| + tether_network->set_tether_guid(std::string());
|
| +
|
| + NotifyNetworkListChanged();
|
| +
|
| + return true;
|
| +}
|
| +
|
| bool NetworkStateHandler::AssociateTetherNetworkStateWithWifiNetwork(
|
| const std::string& tether_network_guid,
|
| const std::string& wifi_network_guid) {
|
|
|