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

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: update wifi_sync component to use security_class() Created 6 years 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..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);

Powered by Google App Engine
This is Rietveld 408576698