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

Unified Diff: chromeos/network/shill_property_util.cc

Issue 23872021: Use Name not SSID in CopyIdentifyingProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Eliminate CopyIdentifyingProperties Created 7 years, 3 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 c97c152a6d7c4fd6b7b0ff640caca73419742571..10a443af131c8a5b8f51c96c46abcd32b518d138 100644
--- a/chromeos/network/shill_property_util.cc
+++ b/chromeos/network/shill_property_util.cc
@@ -178,62 +178,6 @@ void SetUIData(const NetworkUIData& ui_data,
ui_data_blob);
}
-bool CopyIdentifyingProperties(const base::DictionaryValue& service_properties,
- base::DictionaryValue* dest) {
- bool success = true;
-
- // GUID is optional.
- CopyStringFromDictionary(service_properties, flimflam::kGuidProperty, dest);
-
- std::string type;
- service_properties.GetStringWithoutPathExpansion(flimflam::kTypeProperty,
- &type);
- success &= !type.empty();
- dest->SetStringWithoutPathExpansion(flimflam::kTypeProperty, type);
- if (type == flimflam::kTypeWifi) {
- success &= CopyStringFromDictionary(
- service_properties, flimflam::kSecurityProperty, dest);
- success &= CopyStringFromDictionary(
- service_properties, flimflam::kSSIDProperty, dest);
- success &= CopyStringFromDictionary(
- service_properties, flimflam::kModeProperty, dest);
- } else if (type == flimflam::kTypeVPN) {
- success &= CopyStringFromDictionary(
- service_properties, flimflam::kNameProperty, dest);
- // VPN Provider values are read from the "Provider" dictionary, but written
- // with the keys "Provider.Type" and "Provider.Host".
- const base::DictionaryValue* provider_properties = NULL;
- if (!service_properties.GetDictionaryWithoutPathExpansion(
- flimflam::kProviderProperty, &provider_properties)) {
- NET_LOG_ERROR("CopyIdentifyingProperties", "Missing VPN provider dict");
- return false;
- }
- std::string vpn_provider_type;
- provider_properties->GetStringWithoutPathExpansion(flimflam::kTypeProperty,
- &vpn_provider_type);
- success &= !vpn_provider_type.empty();
- dest->SetStringWithoutPathExpansion(flimflam::kProviderTypeProperty,
- vpn_provider_type);
-
- std::string vpn_provider_host;
- provider_properties->GetStringWithoutPathExpansion(flimflam::kHostProperty,
- &vpn_provider_host);
- success &= !vpn_provider_host.empty();
- dest->SetStringWithoutPathExpansion(flimflam::kProviderHostProperty,
- vpn_provider_host);
- } else if (type == flimflam::kTypeEthernet ||
- type == shill::kTypeEthernetEap) {
- // Ethernet and EthernetEAP don't have any additional identifying
- // properties.
- } else {
- NOTREACHED() << "Unsupported network type " << type;
- success = false;
- }
- if (!success)
- NET_LOG_ERROR("CopyIdentifyingProperties", "Missing required properties");
- return success;
-}
-
} // namespace shill_property_util
namespace {
« chromeos/network/shill_property_util.h ('K') | « chromeos/network/shill_property_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698