Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: content/browser/webui/content_web_ui_controller_factory.cc

Issue 1129123004: Don't treat http://gpu as a WebUI url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CONTENT_EXPORT Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/webui/content_web_ui_controller_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/webui/content_web_ui_controller_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698