| Index: chrome/browser/prefs/proxy_prefs.h
|
| diff --git a/chrome/browser/prefs/proxy_prefs.h b/chrome/browser/prefs/proxy_prefs.h
|
| index da911d4e857db21329aaf8286ee7bd590d984008..a090a5c8daab67fe141aead1918c3d6b7dec2665 100644
|
| --- a/chrome/browser/prefs/proxy_prefs.h
|
| +++ b/chrome/browser/prefs/proxy_prefs.h
|
| @@ -8,6 +8,8 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/values.h"
|
| +
|
| namespace ProxyPrefs {
|
|
|
| // Possible types of specifying proxy settings. Do not change the order of
|
| @@ -50,4 +52,40 @@ bool StringToProxyMode(const std::string& in_value,
|
|
|
| } // namespace ProxyPrefs
|
|
|
| +// Factory and wrapper for proxy preferences dictionaries that are stored
|
| +// in the user preferences. The dictionary has the following structure:
|
| +// {
|
| +// mode: string,
|
| +// server: string,
|
| +// pac_url: string,
|
| +// bypass_list: string
|
| +// }
|
| +// See proxy_prefs.cc for the structure of the respective strings.
|
| +class ProxyPrefsDictionary {
|
| + public:
|
| + explicit ProxyPrefsDictionary(const DictionaryValue* dict);
|
| +
|
| + bool GetMode(ProxyPrefs::ProxyMode* out) const;
|
| + bool GetPacUrl(std::string* out) const;
|
| + bool GetProxyServer(std::string* out) const;
|
| + bool GetBypassList(std::string* out) const;
|
| +
|
| + static DictionaryValue* CreateDirect();
|
| + static DictionaryValue* CreateAutoDetect();
|
| + static DictionaryValue* CreatePacScript(const std::string& pac_url);
|
| + static DictionaryValue* CreateFixedServers(
|
| + const std::string& proxy_server,
|
| + const std::string& bypass_list);
|
| + static DictionaryValue* CreateSystem();
|
| + private:
|
| + static DictionaryValue* CreateDictionary(ProxyPrefs::ProxyMode mode,
|
| + const std::string& pac_url,
|
| + const std::string& proxy_server,
|
| + const std::string& bypass_list);
|
| +
|
| + const DictionaryValue* dict_; // weak pointer
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ProxyPrefsDictionary);
|
| +};
|
| +
|
| #endif // CHROME_BROWSER_PREFS_PROXY_PREFS_H_
|
|
|