#include "services/network/ip_protection/ip_protection_config_getter_mojo_impl.h"
#include <memory>
#include <optional>
#include <vector>
#include "base/check.h"
#include "base/logging.h"
#include "components/ip_protection/common/ip_protection_data_types.h"
#include "services/network/ip_protection/ip_protection_config_cache_impl.h"
#include "services/network/ip_protection/ip_protection_config_getter.h"
#include "services/network/public/mojom/network_context.mojom.h"
namespace network {
namespace {
network::mojom::IpProtectionProxyLayer convertToMojo(
const ip_protection::ProxyLayer& layer) { … }
}
IpProtectionConfigGetterMojoImpl::IpProtectionConfigGetterMojoImpl(
mojo::PendingRemote<network::mojom::IpProtectionConfigGetter>
config_getter) { … }
IpProtectionConfigGetterMojoImpl::~IpProtectionConfigGetterMojoImpl() = default;
bool IpProtectionConfigGetterMojoImpl::IsAvailable() { … }
void IpProtectionConfigGetterMojoImpl::TryGetAuthTokens(
uint32_t batch_size,
ip_protection::ProxyLayer proxy_layer,
TryGetAuthTokensCallback callback) { … }
void IpProtectionConfigGetterMojoImpl::GetProxyList(
GetProxyListCallback callback) { … }
void IpProtectionConfigGetterMojoImpl::OnGotProxyList(
GetProxyListCallback callback,
const std::optional<std::vector<net::ProxyChain>>& proxy_list,
const std::optional<ip_protection::GeoHint>& geo_hint) { … }
void IpProtectionConfigGetterMojoImpl::OnGotAuthTokens(
TryGetAuthTokensCallback callback,
const std::optional<std::vector<ip_protection::BlindSignedAuthToken>>&
tokens,
std::optional<::base::Time> expiration_time) { … }
}