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

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

Issue 9949033: Removed access to prefs that does not work on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bad ifdef Created 8 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
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/chrome_browser.gypi » ('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 27a22cf0cf56c7c27165e7b5f285a13739db6f1a..c5dadc2e31965856a8093cb71f8c33598049762d 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -393,6 +393,14 @@ void NTPResourceCache::CreateNewTabHTML() {
localized_strings.SetString("themegravity",
(alignment & ThemeService::ALIGN_RIGHT) ? "right" : "");
+#if defined(ENABLE_PROMO_RESOURCE_SERVICE)
+ // If the user has preferences for a start and end time for a promo from
+ // the server, and this promo string exists, set the localized string.
+ if (PromoResourceService::CanShowNotificationPromo(profile_)) {
+ localized_strings.SetString("serverpromo",
+ prefs->GetString(prefs::kNtpPromoLine));
+ }
+
// If the user has preferences for a start and end time for a custom logo,
// and the time now is between these two times, show the custom logo.
if (prefs->FindPreference(prefs::kNtpCustomLogoStart) &&
@@ -404,13 +412,9 @@ void NTPResourceCache::CreateNewTabHTML() {
} else {
localized_strings.SetString("customlogo", "false");
}
-
- // If the user has preferences for a start and end time for a promo from
- // the server, and this promo string exists, set the localized string.
- if (PromoResourceService::CanShowNotificationPromo(profile_)) {
- localized_strings.SetString("serverpromo",
- prefs->GetString(prefs::kNtpPromoLine));
- }
+#else
+ localized_strings.SetString("customlogo", "false");
+#endif
// Determine whether to show the menu for accessing tabs on other devices.
bool show_other_sessions_menu = !CommandLine::ForCurrentProcess()->HasSwitch(
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698