From 40d129f2149cc7fe0c23a0a916c2f5d1576a581b Mon Sep 17 00:00:00 2001 From: stevenjb Date: Thu, 15 Jan 2015 14:58:10 -0800 Subject: 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} --- chromeos/dbus/fake_shill_service_client.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to '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 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 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; -- cgit v1.1