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

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

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: rebase Created 7 years, 10 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/ui/webui/ntp/app_launcher_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index c644f7a7522997319e5558494ecf81da0691cb1d..73d63eba71d11e7b128c1715424e0509963d3245 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -182,6 +182,7 @@ NTPResourceCache::NTPResourceCache(Profile* profile)
pref_change_registrar_.Add(prefs::kShowBookmarkBar, callback);
pref_change_registrar_.Add(prefs::kNtpShownPage, callback);
pref_change_registrar_.Add(prefs::kSyncPromoShowNTPBubble, callback);
+ pref_change_registrar_.Add(prefs::kHideWebStoreIcon, callback);
}
NTPResourceCache::~NTPResourceCache() {}
@@ -407,6 +408,8 @@ void NTPResourceCache::CreateNewTabHTML() {
load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled",
is_swipe_tracking_from_scroll_events_enabled_);
load_time_data.SetBoolean("showApps", should_show_apps_page_);
+ load_time_data.SetBoolean("showWebStoreIcon",
+ !prefs->GetBoolean(prefs::kHideWebStoreIcon));
#if defined(OS_CHROMEOS)
load_time_data.SetString("expandMenu",
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698