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

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

Issue 7655008: promo_resource_service fixes/cleanup for promos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: unit test for UnpackPromoSignal reentrancy Created 9 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
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
===================================================================
--- chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (revision 97899)
+++ chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (working copy)
@@ -409,14 +409,8 @@
// 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.
jstritar 2011/08/24 20:13:37 This comment isn't all that relevant anymore... ma
- if (profile_->GetPrefs()->FindPreference(prefs::kNTPPromoStart) &&
- profile_->GetPrefs()->FindPreference(prefs::kNTPPromoEnd) &&
- profile_->GetPrefs()->FindPreference(prefs::kNTPPromoLine) &&
- PromoResourceServiceUtil::CanShowPromo(profile_) &&
- InDateRange(profile_->GetPrefs()->GetDouble(prefs::kNTPPromoStart),
- profile_->GetPrefs()->GetDouble(prefs::kNTPPromoEnd))) {
- localized_strings.SetString(
- "serverpromo",
+ if (PromoResourceService::CanShowPromo(profile_)) {
+ localized_strings.SetString("serverpromo",
profile_->GetPrefs()->GetString(prefs::kNTPPromoLine));
UserMetrics::RecordAction(UserMetricsAction("NTPPromoShown"));
} else {

Powered by Google App Engine
This is Rietveld 408576698