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 a49e0ddbed53969c56fc5916a1b93dd6c470ed96..f80b72108f4221913f50cb3cfac05a2b98eb9b46 100644 |
--- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp |
+++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp |
@@ -39,10 +39,9 @@ namespace { |
class URLSchemesRegistry final { |
public: |
URLSchemesRegistry() |
- : emptyDocumentSchemes({"about"}), |
- // For ServiceWorker schemes: HTTP is required because http://localhost |
- // is considered secure. Additional checks are performed to ensure that |
- // other http pages are filtered out. |
+ : // For ServiceWorker schemes: HTTP is required because http://localhost |
+ // is considered secure. Additional checks are performed to ensure that |
+ // other http pages are filtered out. |
serviceWorkerSchemes({"http", "https"}), |
fetchAPISchemes({"http", "https"}), |
allowedInReferrerSchemes({"http", "https"}) { |
@@ -58,6 +57,8 @@ class URLSchemesRegistry final { |
contentSecurityPolicyBypassingSchemes.insert( |
scheme.c_str(), SchemeRegistry::PolicyAreaAll); |
} |
+ for (auto& scheme : url::GetEmptyDocumentSchemes()) |
+ emptyDocumentSchemes.insert(scheme.c_str()); |
} |
~URLSchemesRegistry() = default; |
@@ -161,11 +162,6 @@ bool SchemeRegistry::shouldTreatURLSchemeAsSecure(const String& scheme) { |
return getURLSchemesRegistry().secureSchemes.contains(scheme); |
} |
-void SchemeRegistry::registerURLSchemeAsEmptyDocument(const String& scheme) { |
- DCHECK_EQ(scheme, scheme.lower()); |
- getMutableURLSchemesRegistry().emptyDocumentSchemes.insert(scheme); |
-} |
- |
bool SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(const String& scheme) { |
DCHECK_EQ(scheme, scheme.lower()); |
if (scheme.isEmpty()) |