#include "components/policy/test_support/test_server_helpers.h"
#include <ranges>
#include <utility>
#include "base/ranges/algorithm.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "net/base/url_util.h"
#include "net/http/http_status_code.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "third_party/re2/src/re2/re2.h"
namespace policy {
BasicHttpResponse;
HttpRequest;
HttpResponse;
namespace {
constexpr net::HttpStatusCode kStandardHttpStatusCodes[] = …;
}
void CustomHttpResponse::SendResponse(
base::WeakPtr<net::test_server::HttpResponseDelegate> delegate) { … }
std::string KeyValueFromUrl(GURL url, const std::string& key) { … }
bool MeetsServerSideRequirements(GURL url) { … }
bool GetTokenFromAuthorization(const HttpRequest& request,
const std::string& token_header_prefix,
std::string* out) { … }
bool GetEnrollmentTokenFromRequest(const HttpRequest& request,
std::string* out) { … }
bool GetDeviceTokenFromRequest(const HttpRequest& request, std::string* out) { … }
bool GetGoogleLoginFromRequest(const net::test_server::HttpRequest& request,
std::string* out) { … }
std::unique_ptr<HttpResponse> CreateHttpResponse(net::HttpStatusCode code,
const std::string& content) { … }
}