Index: chromeos/dbus/fake_shill_profile_client.cc |
diff --git a/chromeos/dbus/fake_shill_profile_client.cc b/chromeos/dbus/fake_shill_profile_client.cc |
index 5ae0145453f82866fcce6e7cedb2b3c861746adf..786aec2e869172f81e57f8f91309e5f6215d0a63 100644 |
--- a/chromeos/dbus/fake_shill_profile_client.cc |
+++ b/chromeos/dbus/fake_shill_profile_client.cc |
@@ -64,8 +64,11 @@ void FakeShillProfileClient::GetProperties( |
std::unique_ptr<base::DictionaryValue> properties( |
profile->properties.DeepCopy()); |
- base::ListValue* entry_paths = new base::ListValue; |
- properties->SetWithoutPathExpansion(shill::kEntriesProperty, entry_paths); |
+ base::ListValue* entry_paths = nullptr; |
+ properties->SetWithoutPathExpansion(shill::kEntriesProperty, |
+ base::MakeUnique<base::ListValue>()); |
+ properties->GetListWithoutPathExpansion(shill::kEntriesProperty, |
+ &entry_paths); |
for (base::DictionaryValue::Iterator it(profile->entries); !it.IsAtEnd(); |
it.Advance()) { |
entry_paths->AppendString(it.key()); |
@@ -149,7 +152,8 @@ void FakeShillProfileClient::AddEntry(const std::string& profile_path, |
ProfileProperties* profile = GetProfile(dbus::ObjectPath(profile_path), |
ErrorCallback()); |
DCHECK(profile); |
- profile->entries.SetWithoutPathExpansion(entry_path, properties.DeepCopy()); |
+ profile->entries.SetWithoutPathExpansion(entry_path, |
+ properties.CreateDeepCopy()); |
DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> |
AddManagerService(entry_path, true); |
} |
@@ -211,8 +215,8 @@ bool FakeShillProfileClient::AddOrUpdateServiceImpl( |
return false; |
} |
- profile->entries.SetWithoutPathExpansion(service_path, |
- service_properties->DeepCopy()); |
+ profile->entries.SetWithoutPathExpansion( |
+ service_path, service_properties->CreateDeepCopy()); |
return true; |
} |