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

Unified Diff: chromeos/dbus/fake_shill_profile_client.cc

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698