chromium/net/proxy_resolution/pac_file_decider.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

// This is the hard-coded location used by the DNS portion of web proxy
// auto-discovery.
//
// Note that we not use DNS devolution to find the WPAD host, since that could
// be dangerous should our top level domain registry  become out of date.
//
// Instead we directly resolve "wpad", and let the operating system apply the
// DNS suffix search paths. This is the same approach taken by Firefox, and
// compatibility hasn't been an issue.
//
// For more details, also check out this comment:
// http://code.google.com/p/chromium/issues/detail?id=18575#c20
const char kWpadUrl[] =;
const int kQuickCheckDelayMs =;

}  // namespace

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 {}

// Initialize the fallback rules.
// (1) WPAD (DHCP).
// (2) WPAD (DNS).
// (3) Custom PAC URL.
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() {}

}  // namespace net