#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/loader/cors/cors_error_string.h"
#include <initializer_list>
#include "base/numerics/safe_conversions.h"
#include "services/network/public/mojom/cors.mojom-blink.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_initiator_type_names.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/text/string_view.h"
namespace blink {
namespace cors {
namespace {
void Append(StringBuilder& builder, std::initializer_list<StringView> views) { … }
bool IsPreflightError(network::mojom::CorsError error_code) { … }
StringView ShortAddressSpace(network::mojom::IPAddressSpace space) { … }
}
String GetErrorString(const network::CorsErrorStatus& status,
const KURL& initial_request_url,
const KURL& last_request_url,
const SecurityOrigin& origin,
ResourceType resource_type,
const AtomicString& initiator_name) { … }
}
}