#include "net/proxy_resolution/pac_file_decider.h"
#include <utility>
#include "base/check_op.h"
#include "base/compiler_specific.h"
#include "base/format_macros.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "net/base/completion_repeating_callback.h"
#include "net/base/host_port_pair.h"
#include "net/base/isolation_info.h"
#include "net/base/net_errors.h"
#include "net/base/request_priority.h"
#include "net/log/net_log_capture_mode.h"
#include "net/log/net_log_event_type.h"
#include "net/log/net_log_source_type.h"
#include "net/proxy_resolution/dhcp_pac_file_fetcher.h"
#include "net/proxy_resolution/pac_file_fetcher.h"
#include "net/url_request/url_request_context.h"
namespace net {
namespace {
bool LooksLikePacScript(const std::u16string& script) { … }
const char kWpadUrl[] = …;
const int kQuickCheckDelayMs = …;
}
PacFileDataWithSource::PacFileDataWithSource() = default;
PacFileDataWithSource::~PacFileDataWithSource() = default;
PacFileDataWithSource::PacFileDataWithSource(const PacFileDataWithSource&) =
default;
PacFileDataWithSource& PacFileDataWithSource::operator=(
const PacFileDataWithSource&) = default;
base::Value::Dict PacFileDecider::PacSource::NetLogParams(
const GURL& effective_pac_url) const { … }
PacFileDecider::PacFileDecider(PacFileFetcher* pac_file_fetcher,
DhcpPacFileFetcher* dhcp_pac_file_fetcher,
NetLog* net_log)
: … { … }
PacFileDecider::~PacFileDecider() { … }
int PacFileDecider::Start(const ProxyConfigWithAnnotation& config,
const base::TimeDelta wait_delay,
bool fetch_pac_bytes,
CompletionOnceCallback callback) { … }
void PacFileDecider::OnShutdown() { … }
const ProxyConfigWithAnnotation& PacFileDecider::effective_config() const { … }
const PacFileDataWithSource& PacFileDecider::script_data() const { … }
PacFileDecider::PacSourceList PacFileDecider::BuildPacSourcesFallbackList(
const ProxyConfig& config) const { … }
void PacFileDecider::OnIOCompletion(int result) { … }
int PacFileDecider::DoLoop(int result) { … }
int PacFileDecider::DoWait() { … }
int PacFileDecider::DoWaitComplete(int result) { … }
int PacFileDecider::DoQuickCheck() { … }
int PacFileDecider::DoQuickCheckComplete(int result) { … }
int PacFileDecider::DoFetchPacScript() { … }
int PacFileDecider::DoFetchPacScriptComplete(int result) { … }
int PacFileDecider::DoVerifyPacScript() { … }
int PacFileDecider::DoVerifyPacScriptComplete(int result) { … }
int PacFileDecider::TryToFallbackPacSource(int error) { … }
PacFileDecider::State PacFileDecider::GetStartState() const { … }
void PacFileDecider::DetermineURL(const PacSource& pac_source,
GURL* effective_pac_url) { … }
const PacFileDecider::PacSource& PacFileDecider::current_pac_source() const { … }
void PacFileDecider::OnWaitTimerFired() { … }
void PacFileDecider::DidComplete() { … }
void PacFileDecider::Cancel() { … }
}