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

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.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
Index: chromeos/network/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index f9b80551740fe7f523fd58afb11b2dfcabc665c3..a7eed361da2314830093d4b21be8361a5558a266 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -831,12 +831,13 @@ void ManagedNetworkConfigurationHandlerImpl::GetDeviceStateProperties(
}
// Convert IPConfig dictionary to a ListValue.
- base::ListValue* ip_configs = new base::ListValue;
+ auto ip_configs = base::MakeUnique<base::ListValue>();
for (base::DictionaryValue::Iterator iter(device_state->ip_configs());
!iter.IsAtEnd(); iter.Advance()) {
ip_configs->Append(iter.value().CreateDeepCopy());
}
- properties->SetWithoutPathExpansion(shill::kIPConfigsProperty, ip_configs);
+ properties->SetWithoutPathExpansion(shill::kIPConfigsProperty,
+ std::move(ip_configs));
}
void ManagedNetworkConfigurationHandlerImpl::GetPropertiesCallback(
@@ -909,7 +910,7 @@ void ManagedNetworkConfigurationHandlerImpl::GetDevicePropertiesSuccess(
const base::DictionaryValue& device_properties) {
// Create a "Device" dictionary in |network_properties|.
network_properties->SetWithoutPathExpansion(
- shill::kDeviceProperty, device_properties.DeepCopy());
+ shill::kDeviceProperty, device_properties.CreateDeepCopy());
send_callback.Run(service_path, std::move(network_properties));
}
« no previous file with comments | « chromeos/network/device_state.cc ('k') | chromeos/network/managed_network_configuration_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698