| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 fetchAPISchemes({"http", "https"}), | 47 fetchAPISchemes({"http", "https"}), |
| 48 allowedInReferrerSchemes({"http", "https"}) { | 48 allowedInReferrerSchemes({"http", "https"}) { |
| 49 for (auto& scheme : url::GetLocalSchemes()) | 49 for (auto& scheme : url::GetLocalSchemes()) |
| 50 localSchemes.insert(scheme.c_str()); | 50 localSchemes.insert(scheme.c_str()); |
| 51 for (auto& scheme : url::GetSecureSchemes()) | 51 for (auto& scheme : url::GetSecureSchemes()) |
| 52 secureSchemes.insert(scheme.c_str()); | 52 secureSchemes.insert(scheme.c_str()); |
| 53 for (auto& scheme : url::GetNoAccessSchemes()) | 53 for (auto& scheme : url::GetNoAccessSchemes()) |
| 54 schemesWithUniqueOrigins.insert(scheme.c_str()); | 54 schemesWithUniqueOrigins.insert(scheme.c_str()); |
| 55 for (auto& scheme : url::GetCORSEnabledSchemes()) | 55 for (auto& scheme : url::GetCORSEnabledSchemes()) |
| 56 CORSEnabledSchemes.insert(scheme.c_str()); | 56 CORSEnabledSchemes.insert(scheme.c_str()); |
| 57 for (auto& scheme : url::GetCSPBypassingSchemes()) { |
| 58 contentSecurityPolicyBypassingSchemes.insert( |
| 59 scheme.c_str(), SchemeRegistry::PolicyAreaAll); |
| 60 } |
| 57 } | 61 } |
| 58 ~URLSchemesRegistry() = default; | 62 ~URLSchemesRegistry() = default; |
| 59 | 63 |
| 60 URLSchemesSet localSchemes; | 64 URLSchemesSet localSchemes; |
| 61 URLSchemesSet displayIsolatedURLSchemes; | 65 URLSchemesSet displayIsolatedURLSchemes; |
| 62 URLSchemesSet secureSchemes; | 66 URLSchemesSet secureSchemes; |
| 63 URLSchemesSet schemesWithUniqueOrigins; | 67 URLSchemesSet schemesWithUniqueOrigins; |
| 64 URLSchemesSet emptyDocumentSchemes; | 68 URLSchemesSet emptyDocumentSchemes; |
| 65 URLSchemesSet schemesForbiddenFromDomainRelaxation; | 69 URLSchemesSet schemesForbiddenFromDomainRelaxation; |
| 66 URLSchemesSet notAllowingJavascriptURLsSchemes; | 70 URLSchemesSet notAllowingJavascriptURLsSchemes; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 364 |
| 361 bool SchemeRegistry::schemeShouldBypassSecureContextCheck( | 365 bool SchemeRegistry::schemeShouldBypassSecureContextCheck( |
| 362 const String& scheme) { | 366 const String& scheme) { |
| 363 if (scheme.isEmpty()) | 367 if (scheme.isEmpty()) |
| 364 return false; | 368 return false; |
| 365 DCHECK_EQ(scheme, scheme.lower()); | 369 DCHECK_EQ(scheme, scheme.lower()); |
| 366 return getURLSchemesRegistry().secureContextBypassingSchemes.contains(scheme); | 370 return getURLSchemesRegistry().secureContextBypassingSchemes.contains(scheme); |
| 367 } | 371 } |
| 368 | 372 |
| 369 } // namespace blink | 373 } // namespace blink |
| OLD | NEW |