#ifndef CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
#define CHROME_BROWSER_PREFS_PROXY_CONFIG_DICTIONARY_H_
#include <string>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/proxy_prefs.h"
namespace base {
class DictionaryValue;
}
class ProxyConfigDictionary {
public:
explicit ProxyConfigDictionary(const base::DictionaryValue* dict);
~ProxyConfigDictionary();
bool GetMode(ProxyPrefs::ProxyMode* out) const;
bool GetPacUrl(std::string* out) const;
bool GetPacMandatory(bool* out) const;
bool GetProxyServer(std::string* out) const;
bool GetBypassList(std::string* out) const;
bool HasBypassList() const;
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(
const std::string& proxy_server,
const std::string& bypass_list);
static base::DictionaryValue* CreateSystem();
private:
static base::DictionaryValue* CreateDictionary(
ProxyPrefs::ProxyMode mode,
const std::string& pac_url,
bool pac_mandatory,
const std::string& proxy_server,
const std::string& bypass_list);
scoped_ptr<base::DictionaryValue> dict_;
DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary);
};
#endif