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

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

Issue 2819303002: Changed wifi arcs to mobile bars for Tether network. (Closed)
Patch Set: khorimoto@ and hansberry@ 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..31957618ff44a97d0a6434a3072c1b6c224d40a7 100644
--- a/chromeos/components/tether/wifi_hotspot_connector.cc
+++ b/chromeos/components/tether/wifi_hotspot_connector.cc
@@ -36,6 +36,7 @@ WifiHotspotConnector::~WifiHotspotConnector() {
void WifiHotspotConnector::ConnectToWifiHotspot(
const std::string& ssid,
const std::string& password,
+ const std::string& guid,
Kyle Horimoto 2017/04/28 22:07:28 tether_network_guid
lesliewatkins 2017/04/29 00:57:54 Done.
const WifiConnectionCallback& callback) {
DCHECK(!ssid.empty());
// Note: |password| can be empty in some cases.
@@ -51,6 +52,7 @@ void WifiHotspotConnector::ConnectToWifiHotspot(
ssid_ = ssid;
password_ = password;
+ guid_ = guid;
wifi_guid_ = base::GenerateGUID();
callback_ = callback;
timer_->Start(FROM_HERE,
@@ -78,7 +80,23 @@ void WifiHotspotConnector::NetworkPropertiesUpdated(
}
if (network->connectable()) {
- // If the network is now connectable, initiate a connection to it.
+ bool successful_association =
+ network_state_handler_->AssociateTetherNetworkStateWithWifiNetwork(
+ guid_, wifi_guid_);
+ if (successful_association) {
+ PA_LOG(INFO) << "Wifi network with ID " << wifi_guid_
+ << " is connectable. Tether network ID: \"" << guid_
Kyle Horimoto 2017/04/28 22:07:28 Add something to the log that says that the networ
lesliewatkins 2017/04/29 00:57:54 Done.
+ << "\", 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 \""
+ << guid_ << "\" to Wi-Fi network with ID: \"" << wifi_guid_
+ << "\"";
+ }
+ // If the network is now connectable, associate it with a Tether network
Kyle Horimoto 2017/04/28 22:07:28 nit: Newline before this.
lesliewatkins 2017/04/29 00:57:54 Done.
+ // ASAP so that the correct icon will be displayed in the tray while the
+ // network is connecting.
network_connect_->ConnectToNetworkId(wifi_guid_);
}
}

Powered by Google App Engine
This is Rietveld 408576698