Index: content/browser/webui/content_web_ui_controller_factory.cc |
diff --git a/content/browser/webui/content_web_ui_controller_factory.cc b/content/browser/webui/content_web_ui_controller_factory.cc |
index 7a9263111f395e7b593854366e3c836851ec4fac..95dedcb0dd4d4aae5e4e271c536a1ad291a58e4a 100644 |
--- a/content/browser/webui/content_web_ui_controller_factory.cc |
+++ b/content/browser/webui/content_web_ui_controller_factory.cc |
@@ -23,6 +23,9 @@ namespace content { |
WebUI::TypeID ContentWebUIControllerFactory::GetWebUIType( |
BrowserContext* browser_context, const GURL& url) const { |
+ if (!url.SchemeIs(kChromeUIScheme)) |
+ return WebUI::kNoWebUI; |
+ |
if (url.host() == kChromeUIWebRTCInternalsHost || |
#if !defined(OS_ANDROID) |
url.host() == kChromeUITracingHost || |
@@ -49,6 +52,9 @@ bool ContentWebUIControllerFactory::UseWebUIBindingsForURL( |
WebUIController* ContentWebUIControllerFactory::CreateWebUIControllerForURL( |
WebUI* web_ui, const GURL& url) const { |
+ if (!url.SchemeIs(kChromeUIScheme)) |
+ return nullptr; |
+ |
if (url.host() == kChromeUIGpuHost) |
return new GpuInternalsUI(web_ui); |
if (url.host() == kChromeUIIndexedDBInternalsHost) |
@@ -69,7 +75,7 @@ WebUIController* ContentWebUIControllerFactory::CreateWebUIControllerForURL( |
return new WebRTCInternalsUI(web_ui); |
#endif |
- return NULL; |
+ return nullptr; |
} |
// static |