Index: chrome/browser/web_resource/promo_resource_service.cc |
=================================================================== |
--- chrome/browser/web_resource/promo_resource_service.cc (revision 140104) |
+++ chrome/browser/web_resource/promo_resource_service.cc (working copy) |
@@ -149,13 +149,6 @@ |
UnpackWebStoreSignal(parsed_json); |
} |
-void PromoResourceService::OnNotificationParsed(double start, double end, |
- bool new_notification) { |
- if (new_notification) { |
- ScheduleNotification(start, end); |
- } |
-} |
- |
void PromoResourceService::ScheduleNotification(double promo_start, |
double promo_end) { |
if (promo_start > 0 && promo_end > 0) { |
@@ -234,16 +227,19 @@ |
void PromoResourceService::UnpackNotificationSignal( |
const DictionaryValue& parsed_json) { |
- scoped_refptr<NotificationPromo> notification_promo = |
- NotificationPromo::Create(profile_, this); |
- notification_promo->InitFromJson(parsed_json); |
+ NotificationPromo notification_promo(profile_); |
+ notification_promo.InitFromJson(parsed_json); |
+ |
+ if (notification_promo.new_notification()) { |
+ ScheduleNotification(notification_promo.StartTimeForGroup(), |
+ notification_promo.EndTime()); |
+ } |
} |
bool PromoResourceService::CanShowNotificationPromo(Profile* profile) { |
- scoped_refptr<NotificationPromo> notification_promo = |
- NotificationPromo::Create(profile, NULL); |
- notification_promo->InitFromPrefs(); |
- return notification_promo->CanShow(); |
+ NotificationPromo notification_promo(profile); |
+ notification_promo.InitFromPrefs(); |
+ return notification_promo.CanShow(); |
} |
void PromoResourceService::UnpackWebStoreSignal( |
Dan Beam
2012/06/04 18:41:04
if we're not using the tips server, how is any of
achuithb
2012/06/04 19:52:59
Chatted about this; Tips server continues to be us
|