From 7407535ca01baf184a5857c8ba08ee4430ce5f10 Mon Sep 17 00:00:00 2001 From: Alexander David Frick Date: Fri, 15 Jul 2022 20:37:45 -0500 Subject: [PATCH] Update url_schemes.cc --- src/content/common/url_schemes.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content/common/url_schemes.cc b/src/content/common/url_schemes.cc index 8cf1d566..a116f914 100644 --- a/src/content/common/url_schemes.cc +++ b/src/content/common/url_schemes.cc @@ -72,7 +72,7 @@ void RegisterContentSchemes(bool should_lock_registry) { url::AddStandardScheme(kChromeUIUntrustedScheme, url::SCHEME_WITH_HOST); url::AddStandardScheme(kGuestScheme, url::SCHEME_WITH_HOST); url::AddStandardScheme(kChromeErrorScheme, url::SCHEME_WITH_HOST); - + url::AddStandardScheme(kIsolatedAppScheme, url::SCHEME_WITH_HOST); for (auto& scheme : schemes.standard_schemes) url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST); @@ -83,6 +83,7 @@ void RegisterContentSchemes(bool should_lock_registry) { schemes.secure_schemes.push_back(kChromeUIScheme); schemes.secure_schemes.push_back(kChromeUIUntrustedScheme); schemes.secure_schemes.push_back(kChromeErrorScheme); + schemes.secure_schemes.push_back(kIsolatedAppScheme); for (auto& scheme : schemes.secure_schemes) url::AddSecureScheme(scheme.c_str()); @@ -98,6 +99,7 @@ void RegisterContentSchemes(bool should_lock_registry) { schemes.cors_enabled_schemes.push_back(kChromeUIScheme); schemes.cors_enabled_schemes.push_back(kChromeUIUntrustedScheme); + schemes.cors_enabled_schemes.push_back(kIsolatedAppScheme); for (auto& scheme : schemes.cors_enabled_schemes) url::AddCorsEnabledScheme(scheme.c_str()); @@ -114,6 +116,7 @@ void RegisterContentSchemes(bool should_lock_registry) { url::EnableNonStandardSchemesForAndroidWebView(); #endif + schemes.service_worker_schemes.push_back(kIsolatedAppScheme); // This should only be registered if the // kEnableServiceWorkerForChromeUntrusted feature is enabled but checking // it here causes a crash when --no-sandbox is enabled. See crbug.com/1313812 @@ -122,6 +125,8 @@ void RegisterContentSchemes(bool should_lock_registry) { // enabled. schemes.service_worker_schemes.push_back(kChromeUIUntrustedScheme); + url::AddWebStorageScheme(kIsolatedAppScheme); + // Prevent future modification of the scheme lists. This is to prevent // accidental creation of data races in the program. Add*Scheme aren't // threadsafe so must be called when GURL isn't used on any other thread. This