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

Unified Diff: chrome/browser/resources/ntp/apps.js

Issue 3292003: De-suck the NTP a bit more: (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Fix unit test Created 10 years, 4 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 | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/resources/ntp/most_visited.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp/apps.js
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 5735b6135285a4131f180e43c3166888d5955cca..5bf1d1a0c91b2096e1c5a95cdf3df8f2fb872696 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -10,6 +10,11 @@ function getAppsCallback(data) {
appsSectionContent.textContent = '';
appsMiniview.textContent = '';
+ if (data.apps.length == 0) {
+ appsSection.classList.add('disabled');
+ return;
+ }
+
data.apps.forEach(function(app) {
appsSectionContent.appendChild(apps.createElement(app));
});
@@ -20,6 +25,7 @@ function getAppsCallback(data) {
appsMiniview.appendChild(apps.createMiniviewElement(app));
});
+ appsSection.classList.remove('disabled');
layoutSections();
}
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/browser/resources/ntp/most_visited.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698