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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.h

Issue 2888073002: Remove raw DictionaryValue::Set in //chrome (Closed)
Patch Set: Fix Tests Created 3 years, 7 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.h
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.h b/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
index f7ee9a2b968e82d0e342aef2f5dcddc3e20813cf..f572165276e602634fa9a5a12b1764029f56b126 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.h
@@ -112,25 +112,26 @@ bool JoinUrlList(const base::ListValue* list,
// Creates and returns a ProxyRules dictionary as defined in the extension API
// with the values of a ProxyConfigDictionary configured for fixed proxy
-// servers. Returns NULL in case of failures. Ownership is passed to the caller.
-base::DictionaryValue* CreateProxyRulesDict(
+// servers. Returns NULL in case of failures.
+std::unique_ptr<base::DictionaryValue> CreateProxyRulesDict(
const ProxyConfigDictionary& proxy_config);
// Creates and returns a ProxyServer dictionary as defined in the extension API
-// with values from a net::ProxyServer object. Never returns NULL. Ownership is
-// passed to the caller.
-base::DictionaryValue* CreateProxyServerDict(const net::ProxyServer& proxy);
+// with values from a net::ProxyServer object. Never returns NULL.
+std::unique_ptr<base::DictionaryValue> CreateProxyServerDict(
+ const net::ProxyServer& proxy);
// Creates and returns a PacScript dictionary as defined in the extension API
// with the values of a ProxyconfigDictionary configured for pac scripts.
-// Returns NULL in case of failures. Ownership is passed to the caller.
-base::DictionaryValue* CreatePacScriptDict(
+// Returns NULL in case of failures.
+std::unique_ptr<base::DictionaryValue> CreatePacScriptDict(
const ProxyConfigDictionary& proxy_config);
// Tokenizes the |in| at delimiters |delims| and returns a new ListValue with
-// StringValues created from the tokens. Ownership is passed to the caller.
-base::ListValue* TokenizeToStringList(const std::string& in,
- const std::string& delims);
+// StringValues created from the tokens.
+std::unique_ptr<base::ListValue> TokenizeToStringList(
+ const std::string& in,
+ const std::string& delims);
} // namespace proxy_api_helpers
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698