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

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

Issue 382113002: Only enable Hotwords when extensions are enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
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 12aa37071bdce5820455a43e97545b314a2cf53c..d1794b4604b25950330fcf5c3bc853f55c8ca1d7 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -56,7 +56,6 @@
#include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
#include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
#include "chrome/browser/ui/webui/version_ui.h"
-#include "chrome/browser/ui/webui/voicesearch_ui.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
@@ -162,6 +161,10 @@
#include "chrome/browser/ui/webui/app_list/start_page_ui.h"
#endif
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/ui/webui/voicesearch_ui.h"
+#endif
+
using content::WebUI;
using content::WebUIController;
using ui::ExternalWebDialogUI;
@@ -325,8 +328,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<UserActionsUI>;
if (url.host() == chrome::kChromeUIVersionHost)
return &NewWebUI<VersionUI>;
+#if defined(ENABLE_EXTENSIONS)
if (url.host() == chrome::kChromeUIVoiceSearchHost)
return &NewWebUI<VoiceSearchUI>;
+#endif
#if defined(ENABLE_WEBRTC)
if (url.host() == chrome::kChromeUIWebRtcLogsHost)
return &NewWebUI<WebRtcLogsUI>;

Powered by Google App Engine
This is Rietveld 408576698