chromium/net/quic/quic_session_pool_job.h

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

#ifndef NET_QUIC_QUIC_SESSION_POOL_JOB_H_
#define NET_QUIC_QUIC_SESSION_POOL_JOB_H_

#include "base/memory/raw_ptr.h"
#include "net/base/net_error_details.h"
#include "net/base/request_priority.h"
#include "net/log/net_log_with_source.h"
#include "net/quic/quic_session_attempt.h"
#include "net/quic/quic_session_pool.h"

namespace net {

// Responsible for creating a new QUIC session to the specified server, and for
// notifying any associated requests when complete.
//
// A single Job can be associated with any number of `QuicSessionRequest`
// instances, and will update all of them with its progress, calling some or
// all of their `OnHostResolution()` or `OnQuicSessionCreationComplete()`
// methods, as indicated by calls to `ExpectOnHostResolution()` and
// `ExpectQuicSessionCreation()`, respectively.
//
// When the session is confirmed, the job will call the pool's
// `ActivateSession` method before invoking the callback from `Run`.
//
// The |client_config_handle| is not actually used, but serves to keep the
// corresponding CryptoClientConfig alive until the Job completes.
class QuicSessionPool::Job : public QuicSessionAttempt::Delegate {};

}  // namespace net

#endif  // NET_QUIC_QUIC_SESSION_POOL_JOB_H_