Index: chromeos/dbus/fake_shill_manager_client.cc |
diff --git a/chromeos/dbus/fake_shill_manager_client.cc b/chromeos/dbus/fake_shill_manager_client.cc |
index 9a1029b8906468bd77472f4013d21b81707d62d8..bbea7ead205dcb31ac0cca072bb8c316a138e8ad 100644 |
--- a/chromeos/dbus/fake_shill_manager_client.cc |
+++ b/chromeos/dbus/fake_shill_manager_client.cc |
@@ -185,7 +185,7 @@ void FakeShillManagerClient::SetProperty(const std::string& name, |
const base::Closure& callback, |
const ErrorCallback& error_callback) { |
VLOG(2) << "SetProperty: " << name; |
- stub_properties_.SetWithoutPathExpansion(name, value.DeepCopy()); |
+ stub_properties_.SetWithoutPathExpansion(name, value.CreateDeepCopy()); |
CallNotifyObserversPropertyChanged(name); |
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); |
} |
@@ -454,8 +454,9 @@ void FakeShillManagerClient::AddGeoNetwork( |
base::ListValue* list_value = NULL; |
if (!stub_geo_networks_.GetListWithoutPathExpansion(technology, |
&list_value)) { |
- list_value = new base::ListValue; |
- stub_geo_networks_.SetWithoutPathExpansion(technology, list_value); |
+ stub_geo_networks_.SetWithoutPathExpansion( |
+ technology, base::MakeUnique<base::ListValue>()); |
+ stub_geo_networks_.GetListWithoutPathExpansion(technology, &list_value); |
} |
list_value->Append(network.CreateDeepCopy()); |
} |
@@ -976,10 +977,10 @@ void FakeShillManagerClient::NotifyObserversPropertyChanged( |
base::ListValue* FakeShillManagerClient::GetListProperty( |
const std::string& property) { |
base::ListValue* list_property = NULL; |
- if (!stub_properties_.GetListWithoutPathExpansion( |
- property, &list_property)) { |
- list_property = new base::ListValue; |
- stub_properties_.SetWithoutPathExpansion(property, list_property); |
+ if (!stub_properties_.GetListWithoutPathExpansion(property, &list_property)) { |
+ stub_properties_.SetWithoutPathExpansion( |
+ property, base::MakeUnique<base::ListValue>()); |
+ stub_properties_.GetListWithoutPathExpansion(property, &list_property); |
} |
return list_property; |
} |
@@ -1017,9 +1018,9 @@ void FakeShillManagerClient::SetTechnologyEnabled( |
SortManagerServices(true); |
} |
-base::ListValue* FakeShillManagerClient::GetEnabledServiceList( |
+std::unique_ptr<base::ListValue> FakeShillManagerClient::GetEnabledServiceList( |
const std::string& property) const { |
- base::ListValue* new_service_list = new base::ListValue; |
+ auto new_service_list = base::MakeUnique<base::ListValue>(); |
const base::ListValue* service_list; |
if (stub_properties_.GetListWithoutPathExpansion(property, &service_list)) { |
ShillServiceClient::TestInterface* service_client = |