#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#include <algorithm>
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
#include "third_party/blink/renderer/platform/wtf/threading.h"
#include "url/url_util.h"
namespace blink {
void SetDomainRelaxationForbiddenForTest(bool forbidden,
const WebString& scheme) { … }
void ResetDomainRelaxationForTest() { … }
namespace {
struct PolicyAreasHashTraits : HashTraits<SchemeRegistry::PolicyAreas> { … };
class URLSchemesRegistry final { … };
const URLSchemesRegistry& GetURLSchemesRegistry() { … }
URLSchemesRegistry& GetMutableURLSchemesRegistry() { … }
URLSchemesRegistry& GetMutableURLSchemesRegistryForTest() { … }
}
void SchemeRegistry::RegisterURLSchemeAsDisplayIsolated(const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsDisplayIsolated(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsRestrictingMixedContent(
const String& scheme) { … }
bool SchemeRegistry::ShouldLoadURLSchemeAsEmptyDocument(const String& scheme) { … }
void SchemeRegistry::SetDomainRelaxationForbiddenForURLSchemeForTest(
bool forbidden,
const String& scheme) { … }
void SchemeRegistry::ResetDomainRelaxationForTest() { … }
bool SchemeRegistry::IsDomainRelaxationForbiddenForURLScheme(
const String& scheme) { … }
bool SchemeRegistry::CanDisplayOnlyIfCanRequest(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsNotAllowingJavascriptURLs(
const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsNotAllowingJavascriptURLs(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsNotAllowingJavascriptURLs(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsCorsEnabled(const String& scheme) { … }
String SchemeRegistry::ListOfCorsEnabledURLSchemes() { … }
bool SchemeRegistry::ShouldTrackUsageMetricsForScheme(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsAllowingServiceWorkers(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsAllowingServiceWorkers(
const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsSupportingFetchAPI(
const String& scheme) { … }
bool SchemeRegistry::IsSpecialScheme(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsFirstPartyWhenTopLevel(
const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsFirstPartyWhenTopLevel(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(
const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsFirstPartyWhenTopLevelEmbeddingSecure(
const String& scheme) { … }
bool SchemeRegistry::
ShouldTreatURLSchemeAsFirstPartyWhenTopLevelEmbeddingSecure(
const String& top_level_scheme,
const String& child_scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsAllowedForReferrer(
const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsAllowedForReferrer(const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsAllowedForReferrer(
const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsError(const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsError(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsAllowingSharedArrayBuffers(
const String& scheme) { … }
bool SchemeRegistry::ShouldTreatURLSchemeAsAllowingSharedArrayBuffers(
const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
const String& scheme,
PolicyAreas policy_areas) { … }
void SchemeRegistry::RemoveURLSchemeRegisteredAsBypassingContentSecurityPolicy(
const String& scheme) { … }
bool SchemeRegistry::SchemeShouldBypassContentSecurityPolicy(
const String& scheme,
PolicyAreas policy_areas) { … }
void SchemeRegistry::RegisterURLSchemeBypassingSecureContextCheck(
const String& scheme) { … }
bool SchemeRegistry::SchemeShouldBypassSecureContextCheck(
const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsAllowingWasmEvalCSP(
const String& scheme) { … }
bool SchemeRegistry::SchemeSupportsWasmEvalCSP(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsWebUI(const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsWebUI(const String& scheme) { … }
bool SchemeRegistry::IsWebUIScheme(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsWebUIForTest(const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsWebUIForTest(const String& scheme) { … }
void SchemeRegistry::RegisterURLSchemeAsCodeCacheWithHashing(
const String& scheme) { … }
void SchemeRegistry::RemoveURLSchemeAsCodeCacheWithHashing(
const String& scheme) { … }
bool SchemeRegistry::SchemeSupportsCodeCacheWithHashing(const String& scheme) { … }
}