From 9dca7f7f204ede8d0ed4c1447c16fb8b52336a1f Mon Sep 17 00:00:00 2001 From: lizhiwei Date: Thu, 26 Dec 2024 15:34:49 +0800 Subject: [PATCH] devtools error page Signed-off-by: lizhiwei --- content/public/common/url_constants.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/public/common/url_constants.cc b/content/public/common/url_constants.cc index b22e3d5d68..c142b32ae7 100644 --- a/content/public/common/url_constants.cc +++ b/content/public/common/url_constants.cc @@ -12,7 +12,11 @@ namespace content { // Before adding new chrome schemes please check with security@chromium.org. // There are security implications associated with introducing new schemes. const char kChromeDevToolsScheme[] = "devtools"; +#if (BUILDFLAG(IS_OHOS) && defined(OHOS_DEVTOOLS)) +const char kChromeErrorScheme[] = "arkweb-error"; +#else const char kChromeErrorScheme[] = "chrome-error"; +#endif const char kChromeUIScheme[] = "chrome"; const char kChromeUIUntrustedScheme[] = "chrome-untrusted"; const char kViewSourceScheme[] = "view-source"; @@ -48,7 +52,11 @@ const char kChromeUIWebRTCInternalsHost[] = "webrtc-internals"; // This error URL is loaded in normal web renderer processes, so it should not // have a chrome:// scheme that might let it be confused with a WebUI page. +#if (BUILDFLAG(IS_OHOS) && defined(OHOS_DEVTOOLS)) +const char kUnreachableWebDataURL[] = "arkweb-error://webdata/"; +#else const char kUnreachableWebDataURL[] = "chrome-error://chromewebdata/"; +#endif const char kBlockedURL[] = "about:blank#blocked"; #if defined(OHOS_ARKWEB_EXTENSIONS) -- Gitee