Chromium Code Reviews| Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc |
| =================================================================== |
| --- chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (revision 101174) |
| +++ chrome/browser/ui/webui/ntp/ntp_resource_cache.cc (working copy) |
| @@ -418,14 +418,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. |
| - 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_)) { |
|
jstritar
2011/09/15 15:42:27
nit: CanShowNotificationPromo
achuithb
2011/09/15 18:58:13
Done.
|
| + localized_strings.SetString("serverpromo", |
| profile_->GetPrefs()->GetString(prefs::kNTPPromoLine)); |
| UserMetrics::RecordAction(UserMetricsAction("NTPPromoShown")); |
| } |