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

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

Issue 2819303002: Changed wifi arcs to mobile bars for Tether network. (Closed)
Patch Set: khorimoto@ comments 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..aab09eaeeaa7dda0b14d8aac8d4f320d5a5935cb 100644
--- a/chromeos/components/tether/wifi_hotspot_connector.cc
+++ b/chromeos/components/tether/wifi_hotspot_connector.cc
@@ -21,9 +21,11 @@ namespace tether {
WifiHotspotConnector::WifiHotspotConnector(
NetworkStateHandler* network_state_handler,
- NetworkConnect* network_connect)
+ NetworkConnect* network_connect,
+ ActiveHost* active_host)
: network_state_handler_(network_state_handler),
network_connect_(network_connect),
+ active_host_(active_host),
timer_(base::MakeUnique<base::OneShotTimer>()),
weak_ptr_factory_(this) {
network_state_handler_->AddObserver(this, FROM_HERE);
@@ -79,6 +81,22 @@ void WifiHotspotConnector::NetworkPropertiesUpdated(
if (network->connectable()) {
// If the network is now connectable, initiate a connection to it.
Kyle Horimoto 2017/04/27 01:28:07 Move this comment to before the ConnectToNetworkId
lesliewatkins 2017/04/28 21:30:43 Done.
+ std::string tether_guid = active_host_->GetTetherNetworkGuid();
Kyle Horimoto 2017/04/27 01:28:07 I apologize for not noticing this earlier, but thi
lesliewatkins 2017/04/28 21:30:43 Done.
+ 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