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

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 821643005: Provide GUID in ONC for all networks in ManagedNetworkConfigurationHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos_unittests Created 5 years, 11 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/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 8bb234b8b4389d7248201121f41cc4252b169bac..d4e789c3be959eee3930151391cb3459f7106480 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;
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/network/managed_network_configuration_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698