| Index: chromeos/network/device_state.cc
|
| diff --git a/chromeos/network/device_state.cc b/chromeos/network/device_state.cc
|
| index 9f69f60ba2b7eb7cbda761504d82b075ff9751be..942283c15db60b18d4da319b7453a94a2ad956aa 100644
|
| --- a/chromeos/network/device_state.cc
|
| +++ b/chromeos/network/device_state.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chromeos/network/device_state.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "chromeos/network/network_event_log.h"
|
| @@ -30,7 +31,7 @@ DeviceState::~DeviceState() {
|
| bool DeviceState::PropertyChanged(const std::string& key,
|
| const base::Value& value) {
|
| // All property values get stored in |properties_|.
|
| - properties_.SetWithoutPathExpansion(key, value.DeepCopy());
|
| + properties_.SetWithoutPathExpansion(key, value.CreateDeepCopy());
|
|
|
| if (ManagedStatePropertyChanged(key, value))
|
| return true;
|
| @@ -122,8 +123,9 @@ void DeviceState::IPConfigPropertiesChanged(
|
| ip_config->Clear();
|
| } else {
|
| NET_LOG_EVENT("IPConfig Added: " + ip_config_path, path());
|
| - ip_config = new base::DictionaryValue;
|
| - ip_configs_.SetWithoutPathExpansion(ip_config_path, ip_config);
|
| + ip_configs_.SetWithoutPathExpansion(
|
| + ip_config_path, base::MakeUnique<base::DictionaryValue>());
|
| + ip_configs_.GetDictionaryWithoutPathExpansion(ip_config_path, &ip_config);
|
| }
|
| ip_config->MergeDictionary(&properties);
|
| }
|
|
|