#include "quiche/quic/core/crypto/quic_client_session_cache.h"
#include <memory>
#include <string>
#include <utility>
#include "quiche/quic/core/quic_clock.h"
namespace quic {
namespace {
const size_t kDefaultMaxEntries = …;
bool IsValid(SSL_SESSION* session, uint64_t now) { … }
bool DoApplicationStatesMatch(const ApplicationState* state,
ApplicationState* other) { … }
}
QuicClientSessionCache::QuicClientSessionCache()
: … { … }
QuicClientSessionCache::QuicClientSessionCache(size_t max_entries)
: … { … }
QuicClientSessionCache::~QuicClientSessionCache() { … }
void QuicClientSessionCache::Insert(const QuicServerId& server_id,
bssl::UniquePtr<SSL_SESSION> session,
const TransportParameters& params,
const ApplicationState* application_state) { … }
std::unique_ptr<QuicResumptionState> QuicClientSessionCache::Lookup(
const QuicServerId& server_id, QuicWallTime now, const SSL_CTX* ) { … }
void QuicClientSessionCache::ClearEarlyData(const QuicServerId& server_id) { … }
void QuicClientSessionCache::OnNewTokenReceived(const QuicServerId& server_id,
absl::string_view token) { … }
void QuicClientSessionCache::RemoveExpiredEntries(QuicWallTime now) { … }
void QuicClientSessionCache::Clear() { … }
void QuicClientSessionCache::CreateAndInsertEntry(
const QuicServerId& server_id, bssl::UniquePtr<SSL_SESSION> session,
const TransportParameters& params,
const ApplicationState* application_state) { … }
QuicClientSessionCache::Entry::Entry() = default;
QuicClientSessionCache::Entry::Entry(Entry&&) = default;
QuicClientSessionCache::Entry::~Entry() = default;
void QuicClientSessionCache::Entry::PushSession(
bssl::UniquePtr<SSL_SESSION> session) { … }
bssl::UniquePtr<SSL_SESSION> QuicClientSessionCache::Entry::PopSession() { … }
SSL_SESSION* QuicClientSessionCache::Entry::PeekSession() { … }
}