Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1321)

Unified Diff: third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp

Issue 2760463005: Fix handling of external protocols with PlzNavigate. (Closed)
Patch Set: without PlzNavigate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..6490b2f20571593b64f8d1e57ce9cdef9bc3f00d 100644
--- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
@@ -39,8 +39,7 @@ namespace {
class URLSchemesRegistry final {
public:
URLSchemesRegistry()
- : emptyDocumentSchemes({"about"}),
- // For ServiceWorker schemes: HTTP is required because http://localhost
+ : // 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"}),
@@ -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())

Powered by Google App Engine
This is Rietveld 408576698