Chromium Code Reviews| Index: components/proxy_config/proxy_config_dictionary.h |
| diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h |
| index 1faa121a392dba5ab9402874799120bab38510ca..447f8d8dd658bdd727d82d70eff8a09ab0c4102b 100644 |
| --- a/components/proxy_config/proxy_config_dictionary.h |
| +++ b/components/proxy_config/proxy_config_dictionary.h |
| @@ -31,6 +31,7 @@ class ProxyServer; |
| // See proxy_config_dictionary.cc for the structure of the respective strings. |
| class PROXY_CONFIG_EXPORT ProxyConfigDictionary { |
| public: |
| + explicit ProxyConfigDictionary(std::unique_ptr<base::DictionaryValue> dict); |
|
vabr (Chromium)
2017/03/30 12:07:41
stevenjb@ -- if you are wondering why I added this
stevenjb
2017/03/30 17:00:58
I'm a little uncomfortable with having two such si
vabr (Chromium)
2017/03/30 17:04:21
That's no problem. I like that idea better than th
|
| // Creates a deep copy of |dict| and leaves ownership to caller. |
| explicit ProxyConfigDictionary(const base::DictionaryValue* dict); |
| ~ProxyConfigDictionary(); |
| @@ -44,14 +45,15 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary { |
| const base::DictionaryValue& GetDictionary() const; |
| - static base::DictionaryValue* CreateDirect(); |
| - static base::DictionaryValue* CreateAutoDetect(); |
| - static base::DictionaryValue* CreatePacScript(const std::string& pac_url, |
| - bool pac_mandatory); |
| - static base::DictionaryValue* CreateFixedServers( |
| + static std::unique_ptr<base::DictionaryValue> CreateDirect(); |
| + static std::unique_ptr<base::DictionaryValue> CreateAutoDetect(); |
| + static std::unique_ptr<base::DictionaryValue> CreatePacScript( |
| + const std::string& pac_url, |
| + bool pac_mandatory); |
| + static std::unique_ptr<base::DictionaryValue> CreateFixedServers( |
| const std::string& proxy_server, |
| const std::string& bypass_list); |
| - static base::DictionaryValue* CreateSystem(); |
| + static std::unique_ptr<base::DictionaryValue> CreateSystem(); |
| // Encodes the proxy server as "<url-scheme>=<proxy-scheme>://<proxy>". |
| // Used to generate the |proxy_server| arg for CreateFixedServers(). |
| @@ -60,7 +62,7 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary { |
| std::string* spec); |
| private: |
| - static base::DictionaryValue* CreateDictionary( |
| + static std::unique_ptr<base::DictionaryValue> CreateDictionary( |
| ProxyPrefs::ProxyMode mode, |
| const std::string& pac_url, |
| bool pac_mandatory, |