Chromium Code Reviews| 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 { |