#include "components/plus_addresses/plus_address_jit_allocator.h"
#include <utility>
#include "base/functional/callback.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "components/plus_addresses/plus_address_http_client.h"
#include "components/plus_addresses/plus_address_types.h"
#include "net/http/http_status_code.h"
#include "url/origin.h"
namespace plus_addresses {
namespace {
constexpr base::TimeDelta kRefreshLimitReachedCooldown = …;
}
PlusAddressJitAllocator::PlusAddressJitAllocator(
PlusAddressHttpClient* http_client)
: … { … }
PlusAddressJitAllocator::~PlusAddressJitAllocator() = default;
void PlusAddressJitAllocator::AllocatePlusAddress(
const url::Origin& origin,
AllocationMode mode,
PlusAddressRequestCallback callback) { … }
bool PlusAddressJitAllocator::IsNextAllocationSynchronous() { … }
bool PlusAddressJitAllocator::IsRefreshingSupported(
const url::Origin& origin) const { … }
void PlusAddressJitAllocator::RemoveAllocatedPlusAddress(
const PlusAddress& plus_address) { … }
void PlusAddressJitAllocator::HandleRefreshResponse(
PlusAddressRequestCallback callback,
const PlusProfileOrError& profile_or_error) { … }
}