#include "services/network/trust_tokens/trust_token_key_commitment_controller.h"
#include <memory>
#include <optional>
#include <vector>
#include "base/functional/bind.h"
#include "base/strings/string_util.h"
#include "net/base/load_flags.h"
#include "net/http/http_request_headers.h"
#include "net/url_request/url_request.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/mojom/trust_tokens.mojom.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/trust_tokens/trust_token_parameterization.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace network {
namespace internal {
std::unique_ptr<ResourceRequest> CreateTrustTokenKeyCommitmentRequest(
const net::URLRequest& request,
const url::Origin& top_level_origin) { … }
}
TrustTokenKeyCommitmentController::TrustTokenKeyCommitmentController(
base::OnceCallback<void(Status status,
mojom::TrustTokenKeyCommitmentResultPtr result)>
completion_callback,
const net::URLRequest& request,
const url::Origin& top_level_origin,
const net::NetworkTrafficAnnotationTag& traffic_annotation,
mojom::URLLoaderFactory* loader_factory,
std::unique_ptr<Parser> parser)
: … { … }
TrustTokenKeyCommitmentController::~TrustTokenKeyCommitmentController() =
default;
void TrustTokenKeyCommitmentController::StartRequest(
mojom::URLLoaderFactory* loader_factory) { … }
void TrustTokenKeyCommitmentController::HandleRedirect(
const GURL& url_before_redirect,
const net::RedirectInfo& redirect_info,
const network::mojom::URLResponseHead& response_head,
std::vector<std::string>* to_be_removed_headers) { … }
void TrustTokenKeyCommitmentController::HandleResponseBody(
std::unique_ptr<std::string> response_body) { … }
}