Chromium Code Reviews| 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 { |