| Index: third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
|
| diff --git a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
|
| index 46964fa41cf75e84717c4e74ee3e34721516e65c..9ed54cd0961078b5b37ebe2aae8f692b998805fa 100644
|
| --- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
|
| +++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
|
| @@ -203,6 +203,13 @@ static URLSchemesMap<SchemeRegistry::PolicyAreas>& ContentSecurityPolicyBypassin
|
| return schemes;
|
| }
|
|
|
| +static URLSchemesSet& secureContextBypassingSchemes()
|
| +{
|
| + assertLockHeld();
|
| + DEFINE_STATIC_LOCAL_NOASSERT(URLSchemesSet, secureContextBypassingSchemes, ());
|
| + return secureContextBypassingSchemes;
|
| +}
|
| +
|
| bool SchemeRegistry::shouldTreatURLSchemeAsLocal(const String& scheme)
|
| {
|
| if (scheme.isEmpty())
|
| @@ -425,4 +432,18 @@ bool SchemeRegistry::schemeShouldBypassContentSecurityPolicy(const String& schem
|
| return (ContentSecurityPolicyBypassingSchemes().get(scheme) & policyAreas) == policyAreas;
|
| }
|
|
|
| +void SchemeRegistry::registerURLSchemeBypassingSecureContextCheck(const String& scheme)
|
| +{
|
| + MutexLocker locker(mutex());
|
| + secureContextBypassingSchemes().add(scheme.lower());
|
| +}
|
| +
|
| +bool SchemeRegistry::schemeShouldBypassSecureContextCheck(const String& scheme)
|
| +{
|
| + if (scheme.isEmpty())
|
| + return false;
|
| + MutexLocker locker(mutex());
|
| + return secureContextBypassingSchemes().contains(scheme.lower());
|
| +}
|
| +
|
| } // namespace blink
|
|
|