| 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 17a0487b0fbfd6565c41e8fa73fefe25a766316d..047c4f1ac10b0f93815e437ae287e68c0cbcad24 100644
|
| --- a/chromeos/dbus/fake_shill_manager_client.cc
|
| +++ b/chromeos/dbus/fake_shill_manager_client.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| #include "base/location.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_number_conversions.h"
|
| @@ -382,7 +383,8 @@ ShillManagerClient::TestInterface* FakeShillManagerClient::GetTestInterface() {
|
|
|
| void FakeShillManagerClient::AddDevice(const std::string& device_path) {
|
| if (GetListProperty(shill::kDevicesProperty)
|
| - ->AppendIfNotPresent(new base::StringValue(device_path))) {
|
| + ->AppendIfNotPresent(
|
| + base::MakeUnique<base::StringValue>(device_path))) {
|
| CallNotifyObserversPropertyChanged(shill::kDevicesProperty);
|
| }
|
| }
|
| @@ -403,13 +405,13 @@ void FakeShillManagerClient::ClearDevices() {
|
| void FakeShillManagerClient::AddTechnology(const std::string& type,
|
| bool enabled) {
|
| if (GetListProperty(shill::kAvailableTechnologiesProperty)
|
| - ->AppendIfNotPresent(new base::StringValue(type))) {
|
| + ->AppendIfNotPresent(base::MakeUnique<base::StringValue>(type))) {
|
| CallNotifyObserversPropertyChanged(
|
| shill::kAvailableTechnologiesProperty);
|
| }
|
| if (enabled &&
|
| GetListProperty(shill::kEnabledTechnologiesProperty)
|
| - ->AppendIfNotPresent(new base::StringValue(type))) {
|
| + ->AppendIfNotPresent(base::MakeUnique<base::StringValue>(type))) {
|
| CallNotifyObserversPropertyChanged(
|
| shill::kEnabledTechnologiesProperty);
|
| }
|
| @@ -433,7 +435,7 @@ void FakeShillManagerClient::SetTechnologyInitializing(const std::string& type,
|
| bool initializing) {
|
| if (initializing) {
|
| if (GetListProperty(shill::kUninitializedTechnologiesProperty)
|
| - ->AppendIfNotPresent(new base::StringValue(type))) {
|
| + ->AppendIfNotPresent(base::MakeUnique<base::StringValue>(type))) {
|
| CallNotifyObserversPropertyChanged(
|
| shill::kUninitializedTechnologiesProperty);
|
| }
|
| @@ -460,8 +462,8 @@ void FakeShillManagerClient::AddGeoNetwork(
|
|
|
| void FakeShillManagerClient::AddProfile(const std::string& profile_path) {
|
| const char* key = shill::kProfilesProperty;
|
| - if (GetListProperty(key)
|
| - ->AppendIfNotPresent(new base::StringValue(profile_path))) {
|
| + if (GetListProperty(key)->AppendIfNotPresent(
|
| + base::MakeUnique<base::StringValue>(profile_path))) {
|
| CallNotifyObserversPropertyChanged(key);
|
| }
|
| }
|
| @@ -481,7 +483,7 @@ void FakeShillManagerClient::AddManagerService(
|
| bool notify_observers) {
|
| VLOG(2) << "AddManagerService: " << service_path;
|
| GetListProperty(shill::kServiceCompleteListProperty)
|
| - ->AppendIfNotPresent(new base::StringValue(service_path));
|
| + ->AppendIfNotPresent(base::MakeUnique<base::StringValue>(service_path));
|
| SortManagerServices(false);
|
| if (notify_observers)
|
| CallNotifyObserversPropertyChanged(shill::kServiceCompleteListProperty);
|
| @@ -1008,7 +1010,7 @@ void FakeShillManagerClient::SetTechnologyEnabled(
|
| base::ListValue* enabled_list =
|
| GetListProperty(shill::kEnabledTechnologiesProperty);
|
| if (enabled)
|
| - enabled_list->AppendIfNotPresent(new base::StringValue(type));
|
| + enabled_list->AppendIfNotPresent(base::MakeUnique<base::StringValue>(type));
|
| else
|
| enabled_list->Remove(base::StringValue(type), NULL);
|
| CallNotifyObserversPropertyChanged(
|
|
|