#include "components/proxy_config/proxy_config_dictionary.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "net/base/proxy_server.h"
#include "net/base/proxy_string_util.h"
#include "net/proxy_resolution/proxy_config.h"
namespace {
const char kProxyMode[] = …;
const char kProxyServer[] = …;
const char kProxyPacUrl[] = …;
const char kProxyPacMandatory[] = …;
const char kProxyBypassList[] = …;
}
ProxyConfigDictionary::ProxyConfigDictionary(base::Value::Dict dict)
: … { … }
ProxyConfigDictionary::ProxyConfigDictionary(ProxyConfigDictionary&& other) { … }
ProxyConfigDictionary::~ProxyConfigDictionary() = default;
bool ProxyConfigDictionary::GetMode(ProxyPrefs::ProxyMode* out) const { … }
bool ProxyConfigDictionary::GetPacUrl(std::string* out) const { … }
bool ProxyConfigDictionary::GetPacMandatory(bool* out) const { … }
bool ProxyConfigDictionary::GetProxyServer(std::string* out) const { … }
bool ProxyConfigDictionary::GetBypassList(std::string* out) const { … }
bool ProxyConfigDictionary::HasBypassList() const { … }
const base::Value::Dict& ProxyConfigDictionary::GetDictionary() const { … }
base::Value::Dict ProxyConfigDictionary::CreateDirect() { … }
base::Value::Dict ProxyConfigDictionary::CreateAutoDetect() { … }
base::Value::Dict ProxyConfigDictionary::CreatePacScript(
const std::string& pac_url,
bool pac_mandatory) { … }
base::Value::Dict ProxyConfigDictionary::CreateFixedServers(
const std::string& proxy_server,
const std::string& bypass_list) { … }
base::Value::Dict ProxyConfigDictionary::CreateSystem() { … }
base::Value::Dict ProxyConfigDictionary::CreateDictionary(
ProxyPrefs::ProxyMode mode,
const std::string& pac_url,
bool pac_mandatory,
const std::string& proxy_server,
const std::string& bypass_list) { … }
void ProxyConfigDictionary::EncodeAndAppendProxyServer(
const std::string& url_scheme,
const net::ProxyServer& server,
std::string* spec) { … }
bool ProxyConfigDictionary::GetString(const char* key, std::string* out) const { … }