Chromium Code Reviews| Index: chromeos/network/shill_property_util.cc |
| diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc |
| index 405de1e3877dbd6b62288a55b0ce5b9536a6c6fa..399e321e75c5b8e3a1060729b90a239f5d801709 100644 |
| --- a/chromeos/network/shill_property_util.cc |
| +++ b/chromeos/network/shill_property_util.cc |
| @@ -57,16 +57,6 @@ bool CopyStringFromDictionary(const base::DictionaryValue& source, |
| return true; |
| } |
| -// This is the same normalization that Shill applies to security types for the |
| -// sake of comparing/identifying WiFi networks. See Shill's |
| -// WiFiService::GetSecurityClass. |
| -std::string GetSecurityClass(const std::string& security) { |
| - if (security == shill::kSecurityRsn || security == shill::kSecurityWpa) |
| - return shill::kSecurityPsk; |
| - else |
| - return security; |
| -} |
| - |
| } // namespace |
| void SetSSID(const std::string ssid, base::DictionaryValue* properties) { |
| @@ -255,14 +245,14 @@ bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties, |
| success &= !type.empty(); |
| dest->SetStringWithoutPathExpansion(shill::kTypeProperty, type); |
| if (type == shill::kTypeWifi) { |
| - std::string security; |
| - service_properties.GetStringWithoutPathExpansion(shill::kSecurityProperty, |
| - &security); |
| - if (security.empty()) { |
| + std::string security_class; |
| + service_properties.GetStringWithoutPathExpansion( |
| + shill::kSecurityClassProperty, &security_class); |
|
pneubeck (no reviews)
2015/01/04 20:47:39
can be replaced by CopyStringFromDictionary
|
| + if (security_class.empty()) { |
| success = false; |
| } else { |
| - dest->SetStringWithoutPathExpansion(shill::kSecurityProperty, |
| - GetSecurityClass(security)); |
| + dest->SetStringWithoutPathExpansion(shill::kSecurityClassProperty, |
| + security_class); |
| } |
| success &= |
| CopyStringFromDictionary(service_properties, shill::kWifiHexSsid, dest); |