summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_shill_service_client.cc
diff options
context:
space:
mode:
authorstevenjb <stevenjb@chromium.org>2015-01-15 14:58:10 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-15 22:59:24 +0000
commit40d129f2149cc7fe0c23a0a916c2f5d1576a581b (patch)
treeece496e2bbf478fd662beb28f4e88e9845e3acab /chromeos/dbus/fake_shill_service_client.cc
parent6010467ce516b25455fb1eea4577b252b55a8ec9 (diff)
downloadchromium_src-40d129f2149cc7fe0c23a0a916c2f5d1576a581b.zip
chromium_src-40d129f2149cc7fe0c23a0a916c2f5d1576a581b.tar.gz
chromium_src-40d129f2149cc7fe0c23a0a916c2f5d1576a581b.tar.bz2
Provide GUID in ONC for all networks in ManagedNetworkConfigurationHandler
BUG=448445 Review URL: https://codereview.chromium.org/821643005 Cr-Commit-Position: refs/heads/master@{#311747}
Diffstat (limited to 'chromeos/dbus/fake_shill_service_client.cc')
-rw-r--r--chromeos/dbus/fake_shill_service_client.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index 8bb234b..d4e789c3 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -432,6 +432,21 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path,
provider->SetWithoutPathExpansion(key, value.DeepCopy());
new_properties.SetWithoutPathExpansion(shill::kProviderProperty, provider);
changed_property = shill::kProviderProperty;
+ } else if (value.GetType() == base::Value::TYPE_DICTIONARY) {
+ const base::DictionaryValue* new_dict = NULL;
+ value.GetAsDictionary(&new_dict);
+ CHECK(new_dict);
+ scoped_ptr<base::Value> cur_value;
+ base::DictionaryValue* cur_dict;
+ if (dict->RemoveWithoutPathExpansion(property, &cur_value) &&
+ cur_value->GetAsDictionary(&cur_dict)) {
+ cur_dict->Clear();
+ cur_dict->MergeDictionary(new_dict);
+ new_properties.SetWithoutPathExpansion(property, cur_value.release());
+ } else {
+ new_properties.SetWithoutPathExpansion(property, value.DeepCopy());
+ }
+ changed_property = property;
} else {
new_properties.SetWithoutPathExpansion(property, value.DeepCopy());
changed_property = property;