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

Unified Diff: chromeos/components/tether/wifi_hotspot_connector.cc

Issue 2819303002: Changed wifi arcs to mobile bars for Tether network. (Closed)
Patch Set: Created 3 years, 8 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
Index: chromeos/components/tether/wifi_hotspot_connector.cc
diff --git a/chromeos/components/tether/wifi_hotspot_connector.cc b/chromeos/components/tether/wifi_hotspot_connector.cc
index 1ec2bed728055bcd31cb540d956d6bf3eff788b9..ed078b28c3126fa7d1636cba9f604817030f2a3a 100644
--- a/chromeos/components/tether/wifi_hotspot_connector.cc
+++ b/chromeos/components/tether/wifi_hotspot_connector.cc
@@ -21,8 +21,10 @@ namespace tether {
WifiHotspotConnector::WifiHotspotConnector(
NetworkStateHandler* network_state_handler,
- NetworkConnect* network_connect)
- : network_state_handler_(network_state_handler),
+ NetworkConnect* network_connect,
+ ActiveHost* active_host)
+ : active_host_(active_host),
+ network_state_handler_(network_state_handler),
network_connect_(network_connect),
timer_(base::MakeUnique<base::OneShotTimer>()),
weak_ptr_factory_(this) {
@@ -79,6 +81,22 @@ void WifiHotspotConnector::NetworkPropertiesUpdated(
if (network->connectable()) {
// If the network is now connectable, initiate a connection to it.
+ std::string tether_guid = active_host_->GetTetherNetworkGuid();
+ bool successful_association =
+ network_state_handler_->AssociateTetherNetworkStateWithWifiNetwork(
+ tether_guid, wifi_guid_);
+ if (successful_association) {
+ PA_LOG(INFO) << "Wifi network with ID " << wifi_guid_
+ << " is connectable. Tether network ID: \"" << tether_guid
+ << "\", Wi-Fi network ID: \"" << wifi_guid_ << "\"";
+ } else {
+ PA_LOG(INFO) << "Wifi network with ID " << wifi_guid_
+ << " is connectable, but failed to associate tether network "
+ "with ID \""
+ << tether_guid << "\" to Wi-Fi network with ID: \""
+ << wifi_guid_ << "\"";
+ }
+
network_connect_->ConnectToNetworkId(wifi_guid_);
}
}

Powered by Google App Engine
This is Rietveld 408576698