Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / browser / webui / web_ui_controller_factory_registry.cc
index f4d65aa..a933ecd 100644 (file)
@@ -5,6 +5,7 @@
 #include "content/browser/webui/web_ui_controller_factory_registry.h"
 
 #include "base/lazy_instance.h"
+#include "content/browser/frame_host/debug_urls.h"
 #include "content/public/common/url_constants.h"
 #include "url/gurl.h"
 
@@ -80,16 +81,11 @@ bool WebUIControllerFactoryRegistry::IsURLAcceptableForWebUI(
     BrowserContext* browser_context,
     const GURL& url) const {
   return UseWebUIForURL(browser_context, url) ||
-      // javascript: URLs are allowed to run in Web UI pages.
-      url.SchemeIs(kJavaScriptScheme) ||
       // It's possible to load about:blank in a Web UI renderer.
       // See http://crbug.com/42547
       url.spec() == kAboutBlankURL ||
-      // Chrome URLs crash, kill, hang, and shorthang are allowed.
-      url == GURL(kChromeUICrashURL) ||
-      url == GURL(kChromeUIKillURL) ||
-      url == GURL(kChromeUIHangURL) ||
-      url == GURL(kChromeUIShorthangURL);
+      // javascript: and debug URLs like chrome://kill are allowed.
+      IsRendererDebugURL(url);
 }
 
 WebUIControllerFactoryRegistry::WebUIControllerFactoryRegistry() {