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

Unified Diff: chromeos/network/shill_property_util.cc

Issue 788633003: chromeos networking: move from security to securityclass property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: rebase, resolve conflicts, update new test data (shill_wifi_dhcp.json) Created 5 years, 11 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/network/shill_property_util.cc
diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc
index 405de1e3877dbd6b62288a55b0ce5b9536a6c6fa..75a94f7fdc7761efc02df87350de2e122d49d28b 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,15 +245,9 @@ 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()) {
- success = false;
- } else {
- dest->SetStringWithoutPathExpansion(shill::kSecurityProperty,
- GetSecurityClass(security));
- }
+ success &=
+ CopyStringFromDictionary(
+ service_properties, shill::kSecurityClassProperty, dest);
success &=
CopyStringFromDictionary(service_properties, shill::kWifiHexSsid, dest);
success &= CopyStringFromDictionary(

Powered by Google App Engine
This is Rietveld 408576698