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

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

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 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 dd943c49b99fa381f9c3ddd4deccc5bfdea2a2ea..8bd587fcf12f8dfd87f4255ad2fc1f7cf99d7448 100644
--- a/components/policy/core/browser/proxy_policy_handler.cc
+++ b/components/policy/core/browser/proxy_policy_handler.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
@@ -175,18 +176,18 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
switch (proxy_mode) {
case ProxyPrefs::MODE_DIRECT:
prefs->SetValue(proxy_config::prefs::kProxy,
- make_scoped_ptr(ProxyConfigDictionary::CreateDirect()));
+ base::WrapUnique(ProxyConfigDictionary::CreateDirect()));
break;
case ProxyPrefs::MODE_AUTO_DETECT:
prefs->SetValue(
proxy_config::prefs::kProxy,
- make_scoped_ptr(ProxyConfigDictionary::CreateAutoDetect()));
+ base::WrapUnique(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,
- make_scoped_ptr(ProxyConfigDictionary::CreatePacScript(
+ base::WrapUnique(ProxyConfigDictionary::CreatePacScript(
pac_url_string, false)));
} else {
NOTREACHED();
@@ -201,14 +202,14 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
bypass_list->GetAsString(&bypass_list_string);
prefs->SetValue(
proxy_config::prefs::kProxy,
- make_scoped_ptr(ProxyConfigDictionary::CreateFixedServers(
+ base::WrapUnique(ProxyConfigDictionary::CreateFixedServers(
proxy_server, bypass_list_string)));
}
break;
}
case ProxyPrefs::MODE_SYSTEM:
prefs->SetValue(proxy_config::prefs::kProxy,
- make_scoped_ptr(ProxyConfigDictionary::CreateSystem()));
+ base::WrapUnique(ProxyConfigDictionary::CreateSystem()));
break;
case ProxyPrefs::kModeCount:
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698