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

Unified Diff: chrome/browser/chromeos/cros/native_network_parser.cc

Issue 10169014: Parse and store Wifi bssid and frequency properites. (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: Provide TestApi for SetSsid/SetHexSsid Created 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/network_library.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/native_network_parser.cc
diff --git a/chrome/browser/chromeos/cros/native_network_parser.cc b/chrome/browser/chromeos/cros/native_network_parser.cc
index 1aaaacfc563c599ca95a68aac5a7e17225cb58ec..792e863fab8729a21bfff86e9e88cbee62c6f794 100644
--- a/chrome/browser/chromeos/cros/native_network_parser.cc
+++ b/chrome/browser/chromeos/cros/native_network_parser.cc
@@ -1028,17 +1028,30 @@ bool NativeWifiNetworkParser::ParseValue(PropertyIndex index,
std::string ssid_hex;
if (!value.GetAsString(&ssid_hex))
return false;
-
wifi_network->SetHexSsid(ssid_hex);
return true;
}
- case PROPERTY_INDEX_WIFI_BSSID:
- case PROPERTY_INDEX_WIFI_AUTH_MODE:
- case PROPERTY_INDEX_WIFI_PHY_MODE:
- case PROPERTY_INDEX_WIFI_HIDDEN_SSID:
- case PROPERTY_INDEX_WIFI_FREQUENCY:
- // These properties are currently not used in the UI.
+ case PROPERTY_INDEX_WIFI_BSSID: {
+ std::string bssid;
+ if (!value.GetAsString(&bssid))
+ return false;
+ wifi_network->set_bssid(bssid);
+ return true;
+ }
+ case PROPERTY_INDEX_WIFI_HIDDEN_SSID: {
+ bool hidden_ssid;
+ if (!value.GetAsBoolean(&hidden_ssid))
+ return false;
+ wifi_network->set_hidden_ssid(hidden_ssid);
+ return true;
+ }
+ case PROPERTY_INDEX_WIFI_FREQUENCY: {
+ int frequency;
+ if (!value.GetAsInteger(&frequency))
+ return false;
+ wifi_network->set_frequency(frequency);
return true;
+ }
case PROPERTY_INDEX_NAME: {
// Does not change network name when it was already set by WiFi.HexSSID.
if (!wifi_network->name().empty())
@@ -1072,7 +1085,6 @@ bool NativeWifiNetworkParser::ParseValue(PropertyIndex index,
}
case PROPERTY_INDEX_PASSPHRASE_REQUIRED: {
bool passphrase_required;
- value.GetAsBoolean(&passphrase_required);
if (!value.GetAsBoolean(&passphrase_required))
break;
wifi_network->set_passphrase_required(passphrase_required);
@@ -1149,6 +1161,8 @@ bool NativeWifiNetworkParser::ParseValue(PropertyIndex index,
wifi_network->set_eap_server_ca_cert_nss_nickname(eap_cert_nickname);
return true;
}
+ case PROPERTY_INDEX_WIFI_AUTH_MODE:
+ case PROPERTY_INDEX_WIFI_PHY_MODE:
case PROPERTY_INDEX_EAP_CLIENT_CERT:
case PROPERTY_INDEX_EAP_CLIENT_CERT_NSS:
case PROPERTY_INDEX_EAP_PRIVATE_KEY:
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/network_library.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698