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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.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: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
index f22e8b3d5137de215149ecd4e1ff9ba0518b92d2..f14448593a28c467368309ab82250feb66a477b0 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -307,7 +307,7 @@ bool GetBypassListFromExtensionPref(const base::DictionaryValue* proxy_config,
return JoinUrlList(bypass_list, ",", out, error, bad_message);
}
-base::DictionaryValue* CreateProxyConfigDict(
+std::unique_ptr<base::DictionaryValue> CreateProxyConfigDict(
ProxyPrefs::ProxyMode mode_enum,
bool pac_mandatory,
const std::string& pac_url,
@@ -315,7 +315,7 @@ base::DictionaryValue* CreateProxyConfigDict(
const std::string& proxy_rules_string,
const std::string& bypass_list,
std::string* error) {
- base::DictionaryValue* result_proxy_config = NULL;
+ std::unique_ptr<base::DictionaryValue> result_proxy_config;
switch (mode_enum) {
case ProxyPrefs::MODE_DIRECT:
result_proxy_config = ProxyConfigDictionary::CreateDirect();

Powered by Google App Engine
This is Rietveld 408576698