| Index: chromeos/network/onc/onc_translator_onc_to_shill.cc
|
| diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc
|
| index 39e75c9a8ff00c81ab1bb75cfcd3929e4020c973..446fa47d28a2828cb16eeedd1c256e2a20f7c366 100644
|
| --- a/chromeos/network/onc/onc_translator_onc_to_shill.cc
|
| +++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
|
| @@ -288,8 +288,9 @@ void LocalTranslator::TranslateNetworkConfiguration() {
|
| // If either type is set to DHCP, provide an empty dictionary to ensure
|
| // that any unset properties are cleared. Note: if either type is specified,
|
| // the other type defaults to DHCP if not specified.
|
| - shill_dictionary_->SetWithoutPathExpansion(shill::kStaticIPConfigProperty,
|
| - new base::DictionaryValue);
|
| + shill_dictionary_->SetWithoutPathExpansion(
|
| + shill::kStaticIPConfigProperty,
|
| + base::MakeUnique<base::DictionaryValue>());
|
| }
|
|
|
| const base::DictionaryValue* proxy_settings = nullptr;
|
| @@ -337,7 +338,7 @@ void LocalTranslator::CopyFieldFromONCToShill(
|
| return;
|
| }
|
| shill_dictionary_->SetWithoutPathExpansion(shill_property_name,
|
| - value->DeepCopy());
|
| + value->CreateDeepCopy());
|
| }
|
|
|
| void LocalTranslator::AddValueAccordingToSignature(
|
| @@ -352,7 +353,7 @@ void LocalTranslator::AddValueAccordingToSignature(
|
| }
|
|
|
| shill_dictionary_->SetWithoutPathExpansion(shill_property_name,
|
| - value.release());
|
| + std::move(value));
|
| }
|
|
|
| void LocalTranslator::TranslateWithTableAndSet(
|
| @@ -389,8 +390,10 @@ void TranslateONCHierarchy(const OncValueSignature& signature,
|
| target_shill_dictionary->GetDictionaryWithoutPathExpansion(
|
| *it, &nested_shill_dict);
|
| if (!nested_shill_dict) {
|
| - nested_shill_dict = new base::DictionaryValue;
|
| - target_shill_dictionary->SetWithoutPathExpansion(*it, nested_shill_dict);
|
| + target_shill_dictionary->SetWithoutPathExpansion(
|
| + *it, base::MakeUnique<base::DictionaryValue>());
|
| + target_shill_dictionary->GetDictionaryWithoutPathExpansion(
|
| + *it, &nested_shill_dict);
|
| }
|
| target_shill_dictionary = nested_shill_dict;
|
| }
|
|
|