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

Unified Diff: chromeos/dbus/fake_shill_device_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 | « chrome/test/chromedriver/chrome/log.cc ('k') | chromeos/dbus/fake_shill_ipconfig_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « chrome/test/chromedriver/chrome/log.cc ('k') | chromeos/dbus/fake_shill_ipconfig_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698