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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 2468673003: [Extensions] Remove ExtensionWebUI (Closed)
Patch Set: maybefix Created 4 years, 1 month 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
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index ab39c3e698a6b33f3182b3c3af3fb9d6e79e92c2..4640702b12494afee3f4721d52682cfab6902878 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -216,15 +216,6 @@ WebUIController* NewWebUI(WebUI* web_ui, const GURL& url) {
return new T(web_ui);
}
-#if defined(ENABLE_EXTENSIONS)
-// Special cases for extensions.
-template<>
-WebUIController* NewWebUI<ExtensionWebUI>(WebUI* web_ui,
- const GURL& url) {
- return new ExtensionWebUI(web_ui, url);
-}
-#endif // defined(ENABLE_EXTENSIONS)
-
// Special case for older about: handlers.
template<>
WebUIController* NewWebUI<AboutUI>(WebUI* web_ui, const GURL& url) {
@@ -312,11 +303,6 @@ bool IsAboutUI(const GURL& url) {
WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
Profile* profile,
const GURL& url) {
-#if defined(ENABLE_EXTENSIONS)
- if (ExtensionWebUI::NeedsExtensionWebUI(profile, url))
- return &NewWebUI<ExtensionWebUI>;
-#endif
-
// This will get called a lot to check all URLs, so do a quick check of other
// schemes to filter out most URLs.
if (!url.SchemeIs(content::kChromeDevToolsScheme) &&
@@ -673,14 +659,7 @@ bool ChromeWebUIControllerFactory::UseWebUIForURL(
bool ChromeWebUIControllerFactory::UseWebUIBindingsForURL(
content::BrowserContext* browser_context, const GURL& url) const {
- bool needs_extensions_web_ui = false;
-#if defined(ENABLE_EXTENSIONS)
- // Extensions are rendered via WebUI in tabs, but don't actually need WebUI
- // bindings (see the ExtensionWebUI constructor).
- needs_extensions_web_ui =
- ExtensionWebUI::NeedsExtensionWebUI(browser_context, url);
-#endif
- return !needs_extensions_web_ui && UseWebUIForURL(browser_context, url);
+ return UseWebUIForURL(browser_context, url);
}
WebUIController* ChromeWebUIControllerFactory::CreateWebUIControllerForURL(

Powered by Google App Engine
This is Rietveld 408576698