mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Delete Alloy bootstrap (fixes #3685)
This commit is contained in:
@@ -5,66 +5,13 @@
|
||||
#include "cef/libcef/common/net/scheme_registration.h"
|
||||
|
||||
#include "base/containers/contains.h"
|
||||
#include "cef/libcef/features/runtime.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "url/url_constants.h"
|
||||
#include "url/url_util.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
#include "cef/libcef/common/app_manager.h"
|
||||
#include "cef/libcef/common/net/scheme_info.h"
|
||||
#endif
|
||||
|
||||
namespace scheme {
|
||||
|
||||
#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
void AddInternalSchemes(content::ContentClient::Schemes* schemes) {
|
||||
if (!cef::IsAlloyRuntimeEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// chrome: and chrome-devtools: schemes are registered in
|
||||
// RenderThreadImpl::RegisterSchemes().
|
||||
// Access restrictions for chrome-extension: and chrome-extension-resource:
|
||||
// schemes will be applied in AlloyContentRendererClient::WillSendRequest().
|
||||
static CefSchemeInfo internal_schemes[] = {
|
||||
{
|
||||
extensions::kExtensionScheme, true, /* is_standard */
|
||||
false, /* is_local */
|
||||
false, /* is_display_isolated */
|
||||
true, /* is_secure */
|
||||
true, /* is_cors_enabled */
|
||||
true, /* is_csp_bypassing */
|
||||
},
|
||||
};
|
||||
|
||||
// The |is_display_isolated| value is excluded here because it's registered
|
||||
// with Blink only.
|
||||
for (const auto& scheme : internal_schemes) {
|
||||
if (scheme.is_standard) {
|
||||
schemes->standard_schemes.push_back(scheme.scheme_name);
|
||||
if (!scheme.is_local && !scheme.is_display_isolated) {
|
||||
schemes->referrer_schemes.push_back(scheme.scheme_name);
|
||||
}
|
||||
}
|
||||
if (scheme.is_local) {
|
||||
schemes->local_schemes.push_back(scheme.scheme_name);
|
||||
}
|
||||
if (scheme.is_secure) {
|
||||
schemes->secure_schemes.push_back(scheme.scheme_name);
|
||||
}
|
||||
if (scheme.is_cors_enabled) {
|
||||
schemes->cors_enabled_schemes.push_back(scheme.scheme_name);
|
||||
}
|
||||
if (scheme.is_csp_bypassing) {
|
||||
schemes->csp_bypassing_schemes.push_back(scheme.scheme_name);
|
||||
}
|
||||
CefAppManager::Get()->AddCustomScheme(&scheme);
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP)
|
||||
|
||||
bool IsInternalHandledScheme(const std::string& scheme) {
|
||||
static const char* schemes[] = {
|
||||
url::kAboutScheme,
|
||||
|
Reference in New Issue
Block a user