#include "components/ip_protection/common/ip_protection_proxy_config_retriever.h"
#include "base/strings/strcat.h"
#include "base/types/expected.h"
#include "build/branding_buildflags.h"
#include "google_apis/common/api_key_request_util.h"
#include "google_apis/google_api_keys.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
namespace ip_protection {
namespace {
constexpr net::NetworkTrafficAnnotationTag kGetProxyConfigTrafficAnnotation = …;
constexpr int kIpProtectionRequestMaxBodySize = …;
constexpr char kProtobufContentType[] = …;
}
IpProtectionProxyConfigRetriever::IpProtectionProxyConfigRetriever(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
std::string type,
std::string api_key)
: … { … }
IpProtectionProxyConfigRetriever::~IpProtectionProxyConfigRetriever() = default;
void IpProtectionProxyConfigRetriever::GetProxyConfig(
std::optional<std::string> oauth_token,
GetProxyConfigCallback callback,
bool for_testing) { … }
void IpProtectionProxyConfigRetriever::OnGetProxyConfigCompleted(
std::unique_ptr<network::SimpleURLLoader> url_loader,
GetProxyConfigCallback callback,
std::unique_ptr<std::string> response) { … }
}