Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc |
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc |
index 7986baaa4390d24dbf46a8ab0865383931da49b2..3fb2d6e7f96f95459ad507934f284a8e98f8e5c2 100644 |
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc |
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc |
@@ -19,6 +19,7 @@ |
#include "base/threading/thread.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/defaults.h" |
+#include "chrome/browser/extensions/app_launcher.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/sessions/session_types.h" |
@@ -118,13 +119,11 @@ NewTabUI::NewTabUI(content::WebUI* web_ui) |
web_ui->AddMessageHandler(new NewTabPageSyncHandler()); |
// Or apps. |
- if (ShouldShowApps()) { |
- ExtensionService* service = GetProfile()->GetExtensionService(); |
- // We might not have an ExtensionService (on ChromeOS when not logged in |
- // for example). |
- if (service) |
- web_ui->AddMessageHandler(new AppLauncherHandler(service)); |
- } |
+ ExtensionService* service = GetProfile()->GetExtensionService(); |
+ // We might not have an ExtensionService (on ChromeOS when not logged in |
+ // for example). |
+ if (service) |
+ web_ui->AddMessageHandler(new AppLauncherHandler(service)); |
#endif |
web_ui->AddMessageHandler(new FaviconWebUIHandler()); |
@@ -298,8 +297,7 @@ bool NewTabUI::ShouldShowApps() { |
// Android does not have apps. |
return false; |
#else |
- return !CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kShowAppListShortcut); |
+ return !extensions::IsAppLauncherEnabled(); |
#endif |
} |