#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/proxy_config/proxy_policy_handler.h"
#include <stddef.h>
#include "base/check.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "components/policy/core/browser/configuration_policy_handler.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/proxy_settings_constants.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_value_map.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/proxy_config/proxy_config_pref_names.h"
#include "components/strings/grit/components_strings.h"
namespace proxy_config {
namespace {
kProxyPacMandatory;
PolicyErrorMap;
PolicyErrorPath;
PolicyMap;
kProxyBypassList;
kProxyMode;
kProxyPacUrl;
kProxyServer;
kProxyServerMode;
kProxySettings;
struct ProxyModeValidationEntry { … };
constexpr ProxyModeValidationEntry kProxyModeValidationMap[] = …;
const char* const kDeprecatedProxyPolicies[] = …;
const base::Value* GetProxyPolicyValue(const base::Value* value,
const char* policy_name) { … }
bool CheckProxyModeAndServerMode(const base::Value* proxy_settings,
PolicyErrorMap* errors,
std::string* mode_value) { … }
base::Value RemapProxyPolicies(const PolicyMap& policies) { … }
}
ProxyPolicyHandler::ProxyPolicyHandler() { … }
ProxyPolicyHandler::~ProxyPolicyHandler() { … }
bool ProxyPolicyHandler::CheckPolicySettings(const PolicyMap& policies,
PolicyErrorMap* errors) { … }
void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
PrefValueMap* prefs) { … }
}