Index: chromeos/network/onc/onc_utils.cc |
diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc |
index a2c2d32545d483357cd0bebbabb310a5ac99cdc6..c6fe451c3716d13daa16601ad883fb55c829ada3 100644 |
--- a/chromeos/network/onc/onc_utils.cc |
+++ b/chromeos/network/onc/onc_utils.cc |
@@ -924,16 +924,16 @@ std::unique_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig( |
std::unique_ptr<base::DictionaryValue> proxy_dict; |
if (type == ::onc::proxy::kDirect) { |
- proxy_dict.reset(ProxyConfigDictionary::CreateDirect()); |
+ proxy_dict = ProxyConfigDictionary::CreateDirect(); |
} else if (type == ::onc::proxy::kWPAD) { |
- proxy_dict.reset(ProxyConfigDictionary::CreateAutoDetect()); |
+ proxy_dict = ProxyConfigDictionary::CreateAutoDetect(); |
} else if (type == ::onc::proxy::kPAC) { |
std::string pac_url; |
onc_proxy_settings.GetStringWithoutPathExpansion(::onc::proxy::kPAC, |
&pac_url); |
GURL url(url_formatter::FixupURL(pac_url, std::string())); |
- proxy_dict.reset(ProxyConfigDictionary::CreatePacScript( |
- url.is_valid() ? url.spec() : std::string(), false)); |
+ proxy_dict = ProxyConfigDictionary::CreatePacScript( |
+ url.is_valid() ? url.spec() : std::string(), false); |
} else if (type == ::onc::proxy::kManual) { |
const base::DictionaryValue* manual_dict = nullptr; |
onc_proxy_settings.GetDictionaryWithoutPathExpansion(::onc::proxy::kManual, |
@@ -953,8 +953,8 @@ std::unique_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig( |
bypass_rules.AssignFrom( |
ConvertOncExcludeDomainsToBypassRules(*exclude_domains)); |
} |
- proxy_dict.reset(ProxyConfigDictionary::CreateFixedServers( |
- manual_spec, bypass_rules.ToString())); |
+ proxy_dict = ProxyConfigDictionary::CreateFixedServers( |
+ manual_spec, bypass_rules.ToString()); |
} else { |
NOTREACHED(); |
} |
@@ -964,8 +964,8 @@ std::unique_ptr<base::DictionaryValue> ConvertOncProxySettingsToProxyConfig( |
std::unique_ptr<base::DictionaryValue> ConvertProxyConfigToOncProxySettings( |
const base::DictionaryValue& proxy_config_value) { |
// Create a ProxyConfigDictionary from the DictionaryValue. |
- std::unique_ptr<ProxyConfigDictionary> proxy_config( |
- new ProxyConfigDictionary(&proxy_config_value)); |
+ auto proxy_config = |
+ base::MakeUnique<ProxyConfigDictionary>(&proxy_config_value); |
stevenjb
2017/03/30 20:39:54
We should convert this to take a unique_ptr; takin
vabr (Chromium)
2017/03/30 20:55:06
Done.
|
// Create the result DictionaryValue and populate it. |
std::unique_ptr<base::DictionaryValue> proxy_settings( |