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

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 694533007: Add 'setProperties' to InternetOptionsHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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/dbus/fake_shill_service_client.cc
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index b21ae61013ca35d88b2e74ad941fed1837afbec1..97f6d3f976e1f4e1daa3ac30232358efd80f2ab3 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -377,7 +377,10 @@ base::DictionaryValue* FakeShillServiceClient::SetServiceProperties(
properties->SetWithoutPathExpansion(shill::kGuidProperty,
new base::StringValue(guid_to_set));
}
- shill_property_util::SetSSID(name, properties);
+ properties->SetWithoutPathExpansion(
pneubeck (no reviews) 2014/11/11 16:09:31 SetStringWithoutPathExpansion would be more compac
stevenjb 2014/11/12 01:23:29 This function predates those. Replaced them all.
+ shill::kSSIDProperty,
+ new base::StringValue(name));
+ shill_property_util::SetSSID(name, properties); // Sets kWifiHexSsid
properties->SetWithoutPathExpansion(
shill::kNameProperty,
new base::StringValue(name));
@@ -431,9 +434,14 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path,
StartsWithASCII(property, "OpenVPN.", case_sensitive) ||
StartsWithASCII(property, "L2TPIPsec.", case_sensitive)) {
// These properties are only nested within the Provider dictionary if read
- // from Shill.
+ // from Shill. Properties that start with "Provider" need to have that
+ // stripped off, other properties are nested in the "Provider" dictionary
+ // as-is.
+ std::string key = property;
+ if (StartsWithASCII(property, "Provider.", case_sensitive))
+ key = property.substr(strlen("Provider."));
base::DictionaryValue* provider = new base::DictionaryValue;
- provider->SetWithoutPathExpansion(property, value.DeepCopy());
+ provider->SetWithoutPathExpansion(key, value.DeepCopy());
new_properties.SetWithoutPathExpansion(shill::kProviderProperty, provider);
changed_property = shill::kProviderProperty;
} else {

Powered by Google App Engine
This is Rietveld 408576698