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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.cc

Issue 13926002: Always show the NTP apps page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU Created 7 years, 8 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/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 10165722a0f7b7bc3b75134c926dffcd3a61f353..1650c9beae7b05ce99e27431b02859e000ac1092 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc
@@ -6,7 +6,6 @@
#include <set>
-#include "apps/app_launcher.h"
#include "base/i18n/rtl.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
@@ -52,6 +51,10 @@
#include "chrome/browser/ui/webui/theme_handler.h"
#endif
+#if defined(USE_ASH)
+#include "chrome/browser/ui/host_desktop.h"
+#endif
+
using content::BrowserThread;
using content::RenderViewHost;
using content::WebUIController;
@@ -242,14 +245,14 @@ void NewTabUI::RegisterUserPrefs(PrefRegistrySyncable* registry) {
// static
bool NewTabUI::ShouldShowApps() {
+// Ash shows apps in app list thus should not show apps page in NTP4.
+// Android does not have apps.
#if defined(OS_ANDROID)
- // Ash shows apps in app list thus should not show apps page in NTP4.
- // Android does not have apps.
return false;
+#elif defined(USE_ASH)
+ return chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH;
#else
- // This needs to be synchronous, so we use the value the last time it
- // was checked.
- return !apps::WasAppLauncherEnabled();
+ return true;
#endif
}
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.cc ('k') | chrome/browser/ui/webui/ntp/ntp_resource_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698