Index: chromeos/network/proxy/proxy_config_handler.cc |
diff --git a/chromeos/network/proxy/proxy_config_handler.cc b/chromeos/network/proxy/proxy_config_handler.cc |
index ed96a8b3889022971b3251e793b1803ef72b1925..f12cbf4c2f96ea5c597b4983f8488fb67644f824 100644 |
--- a/chromeos/network/proxy/proxy_config_handler.cc |
+++ b/chromeos/network/proxy/proxy_config_handler.cc |
@@ -4,6 +4,8 @@ |
#include "chromeos/network/proxy/proxy_config_handler.h" |
+#include <utility> |
+ |
#include "base/bind.h" |
#include "base/json/json_writer.h" |
#include "base/logging.h" |
@@ -60,7 +62,7 @@ std::unique_ptr<ProxyConfigDictionary> GetProxyConfigForNetwork( |
std::unique_ptr<base::DictionaryValue> proxy_dict = |
onc::ConvertOncProxySettingsToProxyConfig(*proxy_policy); |
- return base::MakeUnique<ProxyConfigDictionary>(proxy_dict.get()); |
+ return base::MakeUnique<ProxyConfigDictionary>(std::move(proxy_dict)); |
} |
if (network.profile_path().empty()) |
@@ -90,7 +92,7 @@ std::unique_ptr<ProxyConfigDictionary> GetProxyConfigForNetwork( |
const base::DictionaryValue& value = network.proxy_config(); |
if (value.empty()) |
return std::unique_ptr<ProxyConfigDictionary>(); |
- return base::MakeUnique<ProxyConfigDictionary>(&value); |
+ return base::MakeUnique<ProxyConfigDictionary>(value.CreateDeepCopy()); |
} |
void SetProxyConfigForNetwork(const ProxyConfigDictionary& proxy_config, |