#include "third_party/blink/renderer/platform/loader/allowed_by_nosniff.h"
#include "services/network/public/mojom/fetch_api.mojom-blink.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/console_logger.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
#include "third_party/blink/renderer/platform/network/http_names.h"
#include "third_party/blink/renderer/platform/network/mime/mime_type_registry.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
namespace blink {
namespace {
WebFeature;
const std::array<WebFeature, 2> kApplicationFeatures = …;
const std::array<WebFeature, 2> kTextFeatures = …;
const std::array<WebFeature, 2> kApplicationOctetStreamFeatures = …;
const std::array<WebFeature, 2> kApplicationXmlFeatures = …;
const std::array<WebFeature, 2> kTextHtmlFeatures = …;
const std::array<WebFeature, 2> kTextPlainFeatures = …;
const std::array<WebFeature, 2> kTextXmlFeatures = …;
const std::array<WebFeature, 2> kJsonFeatures = …;
const std::array<WebFeature, 2> kUnknownFeatures = …;
static bool AllowMimeTypeAsScript(
const String& mime_type,
bool same_origin,
AllowedByNosniff::MimeTypeCheck mime_type_check_mode,
std::optional<WebFeature>& counter) { … }
}
bool AllowedByNosniff::MimeTypeAsScript(UseCounter& use_counter,
ConsoleLogger* console_logger,
const ResourceResponse& response,
MimeTypeCheck mime_type_check_mode) { … }
}