Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: components/policy/core/browser/proxy_policy_handler.cc

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: Fix compilation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/browser/proxy_policy_handler.cc
diff --git a/components/policy/core/browser/proxy_policy_handler.cc b/components/policy/core/browser/proxy_policy_handler.cc
index 47e7763e929b7f835c24a8cd577a645e9c5994b8..77c1aa9a13e0fbfa8615a33ac106abe9ea2b0123 100644
--- a/components/policy/core/browser/proxy_policy_handler.cc
+++ b/components/policy/core/browser/proxy_policy_handler.cc
@@ -175,19 +175,18 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
switch (proxy_mode) {
case ProxyPrefs::MODE_DIRECT:
prefs->SetValue(proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateDirect()));
+ ProxyConfigDictionary::CreateDirect());
break;
case ProxyPrefs::MODE_AUTO_DETECT:
- prefs->SetValue(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateAutoDetect()));
+ prefs->SetValue(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateAutoDetect());
break;
case ProxyPrefs::MODE_PAC_SCRIPT: {
std::string pac_url_string;
if (pac_url && pac_url->GetAsString(&pac_url_string)) {
- prefs->SetValue(proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreatePacScript(
- pac_url_string, false)));
+ prefs->SetValue(
+ proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreatePacScript(pac_url_string, false));
} else {
NOTREACHED();
}
@@ -199,16 +198,15 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
if (server->GetAsString(&proxy_server)) {
if (bypass_list)
bypass_list->GetAsString(&bypass_list_string);
- prefs->SetValue(
- proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateFixedServers(
- proxy_server, bypass_list_string)));
+ prefs->SetValue(proxy_config::prefs::kProxy,
+ ProxyConfigDictionary::CreateFixedServers(
+ proxy_server, bypass_list_string));
}
break;
}
case ProxyPrefs::MODE_SYSTEM:
prefs->SetValue(proxy_config::prefs::kProxy,
- base::WrapUnique(ProxyConfigDictionary::CreateSystem()));
+ ProxyConfigDictionary::CreateSystem());
break;
case ProxyPrefs::kModeCount:
NOTREACHED();
« no previous file with comments | « chromeos/network/proxy/ui_proxy_config_service.cc ('k') | components/policy/core/browser/proxy_policy_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698