Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: chromeos/network/network_state_handler.cc

Issue 2819303002: Changed wifi arcs to mobile bars for Tether network. (Closed)
Patch Set: khorimoto@ hansberry@ stevenjb@ comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | chromeos/network/network_state_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..53a2caa6b378c0ff4b0d1557a55d0daf31efd1c4 100644
--- a/chromeos/network/network_state_handler.cc
+++ b/chromeos/network/network_state_handler.cc
@@ -594,13 +594,45 @@ 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.";
stevenjb 2017/05/04 17:21:27 What Kyle meant was: NET_LOG(ERROR) << "Disassocia
lesliewatkins 2017/05/04 17:31:04 Done.
+ 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.";
stevenjb 2017/05/04 17:21:27 nit: Same " " issue here (but as Kyle mentioned, i
lesliewatkins 2017/05/04 17:31:04 Done.
+ 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) {
« no previous file with comments | « chromeos/network/network_state_handler.h ('k') | chromeos/network/network_state_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698