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

Unified Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 11859029: Add a policy to hide the Web Store on new tabs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Check that footer exists before removing icon Created 7 years, 11 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/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 21f5062ab97680733e16d39453d3235d37c38621..aefe0c20a2d0656dc9698ece53b4aee700dc6328 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -668,6 +668,12 @@ cr.define('ntp', function() {
* @param {boolean} animate Whether to animate the insertion.
*/
insertApp: function(appData, animate) {
+ // Don't show the web store icon if policy so dictates.
+ if (appData.is_webstore &&
+ loadTimeData.getBoolean('isWebStoreIconHidden')) {
+ return;
+ }
+
var index = this.tileElements_.length;
for (var i = 0; i < this.tileElements_.length; i++) {
if (appData.app_launch_ordinal <

Powered by Google App Engine
This is Rietveld 408576698