| Index: chromeos/dbus/fake_shill_device_client.cc
|
| diff --git a/chromeos/dbus/fake_shill_device_client.cc b/chromeos/dbus/fake_shill_device_client.cc
|
| index c567864266ba85cf1dadcd51d12ddfd39083e0a5..4ff2f7c2957d67fe6d8e89768ad85216f699a562 100644
|
| --- a/chromeos/dbus/fake_shill_device_client.cc
|
| +++ b/chromeos/dbus/fake_shill_device_client.cc
|
| @@ -121,7 +121,7 @@ void FakeShillDeviceClient::SetPropertyInternal(
|
| PostNotFoundError(error_callback);
|
| return;
|
| }
|
| - device_properties->SetWithoutPathExpansion(name, value.DeepCopy());
|
| + device_properties->SetWithoutPathExpansion(name, value.CreateDeepCopy());
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&FakeShillDeviceClient::NotifyObserversPropertyChanged,
|
| @@ -495,9 +495,11 @@ void FakeShillDeviceClient::SetSimLockStatus(const std::string& device_path,
|
| base::DictionaryValue* simlock_dict = nullptr;
|
| if (!device_properties->GetDictionaryWithoutPathExpansion(
|
| shill::kSIMLockStatusProperty, &simlock_dict)) {
|
| - simlock_dict = new base::DictionaryValue;
|
| - device_properties->SetWithoutPathExpansion(shill::kSIMLockStatusProperty,
|
| - simlock_dict);
|
| + device_properties->SetWithoutPathExpansion(
|
| + shill::kSIMLockStatusProperty,
|
| + base::MakeUnique<base::DictionaryValue>());
|
| + device_properties->GetDictionaryWithoutPathExpansion(
|
| + shill::kSIMLockStatusProperty, &simlock_dict);
|
| }
|
| simlock_dict->Clear();
|
| simlock_dict->SetStringWithoutPathExpansion(shill::kSIMLockTypeProperty,
|
| @@ -613,8 +615,9 @@ base::DictionaryValue* FakeShillDeviceClient::GetDeviceProperties(
|
| base::DictionaryValue* properties = NULL;
|
| if (!stub_devices_.GetDictionaryWithoutPathExpansion(
|
| device_path, &properties)) {
|
| - properties = new base::DictionaryValue;
|
| - stub_devices_.SetWithoutPathExpansion(device_path, properties);
|
| + stub_devices_.SetWithoutPathExpansion(
|
| + device_path, base::MakeUnique<base::DictionaryValue>());
|
| + stub_devices_.GetDictionaryWithoutPathExpansion(device_path, &properties);
|
| }
|
| return properties;
|
| }
|
|
|