chromium/services/network/ip_protection/ip_protection_config_cache_impl.cc

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

#include "services/network/ip_protection/ip_protection_config_cache_impl.h"

#include <string>
#include <vector>

#include "base/metrics/histogram_functions.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "components/ip_protection/common/ip_protection_data_types.h"
#include "components/ip_protection/common/ip_protection_telemetry.h"
#include "net/base/features.h"
#include "net/base/network_change_notifier.h"
#include "net/base/proxy_chain.h"
#include "net/base/proxy_server.h"
#include "net/base/proxy_string_util.h"
#include "services/network/ip_protection/ip_protection_proxy_list_manager.h"
#include "services/network/ip_protection/ip_protection_proxy_list_manager_impl.h"
#include "services/network/ip_protection/ip_protection_token_cache_manager.h"
#include "services/network/ip_protection/ip_protection_token_cache_manager_impl.h"

namespace network {

namespace {
// Rewrite the proxy list to use SCHEME_QUIC. In order to fall back to HTTPS
// quickly if QUIC is broken, the first chain is included once with
// SCHEME_QUIC and once with SCHEME_HTTPS. The remaining chains are included
// only with SCHEME_QUIC.
std::vector<net::ProxyChain> MakeQuicProxyList(
    const std::vector<net::ProxyChain>& proxy_list,
    bool include_https_fallback = true) {}

}  // namespace

IpProtectionConfigCacheImpl::IpProtectionConfigCacheImpl(
    std::unique_ptr<IpProtectionConfigGetter> config_getter)
    :{}

IpProtectionConfigCacheImpl::~IpProtectionConfigCacheImpl() {}

bool IpProtectionConfigCacheImpl::AreAuthTokensAvailable() {}

std::optional<ip_protection::BlindSignedAuthToken>
IpProtectionConfigCacheImpl::GetAuthToken(size_t chain_index) {}

void IpProtectionConfigCacheImpl::InvalidateTryAgainAfterTime() {}

void IpProtectionConfigCacheImpl::SetIpProtectionTokenCacheManagerForTesting(
    ip_protection::ProxyLayer proxy_layer,
    std::unique_ptr<IpProtectionTokenCacheManager> ipp_token_cache_manager) {}

IpProtectionTokenCacheManager*
IpProtectionConfigCacheImpl::GetIpProtectionTokenCacheManagerForTesting(
    ip_protection::ProxyLayer proxy_layer) {}

void IpProtectionConfigCacheImpl::SetIpProtectionProxyListManagerForTesting(
    std::unique_ptr<IpProtectionProxyListManager> ipp_proxy_list_manager) {}

IpProtectionProxyListManager*
IpProtectionConfigCacheImpl::GetIpProtectionProxyListManagerForTesting() {}

bool IpProtectionConfigCacheImpl::IsProxyListAvailable() {}

void IpProtectionConfigCacheImpl::QuicProxiesFailed() {}

std::vector<net::ProxyChain> IpProtectionConfigCacheImpl::GetProxyChainList() {}

void IpProtectionConfigCacheImpl::RequestRefreshProxyList() {}

void IpProtectionConfigCacheImpl::GeoObserved(const std::string& geo_id) {}

void IpProtectionConfigCacheImpl::OnNetworkChanged(
    net::NetworkChangeNotifier::ConnectionType type) {}

}  // namespace network