mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Add support for the chrome-untrusted scheme (see issue #3047)
Lack of this functionality was causing print preview to fail with PdfUnseasoned enabled.
This commit is contained in:
		| @@ -633,6 +633,7 @@ void AlloyContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( | |||||||
|       additional_allowed_schemes); |       additional_allowed_schemes); | ||||||
|   additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); |   additional_allowed_schemes->push_back(content::kChromeDevToolsScheme); | ||||||
|   additional_allowed_schemes->push_back(content::kChromeUIScheme); |   additional_allowed_schemes->push_back(content::kChromeUIScheme); | ||||||
|  |   additional_allowed_schemes->push_back(content::kChromeUIUntrustedScheme); | ||||||
| } | } | ||||||
|  |  | ||||||
| bool AlloyContentBrowserClient::IsWebUIAllowedToMakeNetworkRequests( | bool AlloyContentBrowserClient::IsWebUIAllowedToMakeNetworkRequests( | ||||||
|   | |||||||
| @@ -530,8 +530,10 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory { | |||||||
|  |  | ||||||
|   // Returns true if WebUI is allowed to handle the specified |url|. |   // Returns true if WebUI is allowed to handle the specified |url|. | ||||||
|   static bool AllowWebUIForURL(const GURL& url) { |   static bool AllowWebUIForURL(const GURL& url) { | ||||||
|     if (!url.SchemeIs(content::kChromeUIScheme)) |     if (!url.SchemeIs(content::kChromeUIScheme) && | ||||||
|  |         !url.SchemeIs(content::kChromeUIUntrustedScheme)) { | ||||||
|       return false; |       return false; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if (IsAllowedWebUIHost(url.host())) |     if (IsAllowedWebUIHost(url.host())) | ||||||
|       return true; |       return true; | ||||||
|   | |||||||
| @@ -38,6 +38,7 @@ | |||||||
| #include "content/public/common/content_features.h" | #include "content/public/common/content_features.h" | ||||||
| #include "content/public/common/content_switches.h" | #include "content/public/common/content_switches.h" | ||||||
| #include "content/public/common/main_function_params.h" | #include "content/public/common/main_function_params.h" | ||||||
|  | #include "content/public/common/url_constants.h" | ||||||
| #include "extensions/common/constants.h" | #include "extensions/common/constants.h" | ||||||
| #include "net/base/features.h" | #include "net/base/features.h" | ||||||
| #include "pdf/pdf_ppapi.h" | #include "pdf/pdf_ppapi.h" | ||||||
| @@ -60,7 +61,8 @@ | |||||||
| namespace { | namespace { | ||||||
|  |  | ||||||
| const char* const kNonWildcardDomainNonPortSchemes[] = { | const char* const kNonWildcardDomainNonPortSchemes[] = { | ||||||
|     extensions::kExtensionScheme}; |     extensions::kExtensionScheme, content::kChromeDevToolsScheme, | ||||||
|  |     content::kChromeUIScheme, content::kChromeUIUntrustedScheme}; | ||||||
| const size_t kNonWildcardDomainNonPortSchemesSize = | const size_t kNonWildcardDomainNonPortSchemesSize = | ||||||
|     base::size(kNonWildcardDomainNonPortSchemes); |     base::size(kNonWildcardDomainNonPortSchemes); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -59,6 +59,7 @@ bool IsInternalHandledScheme(const std::string& scheme) { | |||||||
|       url::kBlobScheme, |       url::kBlobScheme, | ||||||
|       content::kChromeDevToolsScheme, |       content::kChromeDevToolsScheme, | ||||||
|       content::kChromeUIScheme, |       content::kChromeUIScheme, | ||||||
|  |       content::kChromeUIUntrustedScheme, | ||||||
|       url::kDataScheme, |       url::kDataScheme, | ||||||
|       extensions::kExtensionScheme, |       extensions::kExtensionScheme, | ||||||
|       url::kFileScheme, |       url::kFileScheme, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user