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

Unified Diff: chrome/browser/resources/ntp4/new_tab.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: 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/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 483446d59822bc3dd377f5a183dd760f29f29b67..713caac72edc632d9d61043509b377331b3485e6 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -162,11 +162,15 @@ cr.define('ntp', function() {
document.querySelector('head').appendChild(suggestions_script);
}
- var webStoreLink = loadTimeData.getString('webStoreLink');
- var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-launcher');
- $('chrome-web-store-link').href = url;
- $('chrome-web-store-link').addEventListener('click',
- onChromeWebStoreButtonClick);
+ if (loadTimeData.getBoolean('isWebStoreIconHidden')) {
+ $('chrome-web-store-link').style.display = 'none';
Joao da Silva 2013/01/18 14:02:50 I think $('chrome-web-store-link').hidden = true;
dconnelly 2013/01/18 17:26:20 I actually think removing the element from the DOM
Joao da Silva 2013/01/21 07:44:50 SGTM but I'd wait for Evan's approval on this :-)
+ } else {
+ var webStoreLink = loadTimeData.getString('webStoreLink');
+ var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-launcher');
+ $('chrome-web-store-link').href = url;
+ $('chrome-web-store-link').addEventListener('click',
+ onChromeWebStoreButtonClick);
+ }
if (loadTimeData.getString('login_status_message')) {
loginBubble = new cr.ui.Bubble;

Powered by Google App Engine
This is Rietveld 408576698