Index: chrome/browser/web_resource/promo_resource_service.cc |
=================================================================== |
--- chrome/browser/web_resource/promo_resource_service.cc (revision 108876) |
+++ chrome/browser/web_resource/promo_resource_service.cc (working copy) |
@@ -7,6 +7,7 @@ |
#include "base/command_line.h" |
#include "base/rand_util.h" |
#include "base/string_number_conversions.h" |
+#include "base/string_split.h" |
#include "base/threading/thread_restrictions.h" |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
@@ -215,14 +216,16 @@ |
void PromoResourceService::UnpackNotificationSignal( |
const DictionaryValue& parsed_json) { |
- NotificationPromo notification_promo(prefs_, this); |
- notification_promo.InitFromJson(parsed_json); |
+ NotificationPromo* notification_promo = |
achuithb
2011/11/16 20:33:11
You are leaking NotificationPromo here. Please do:
Cait (Slow)
2011/11/16 23:05:24
Done.
|
+ NotificationPromo::Factory(profile_, this); |
+ notification_promo->InitFromJson(parsed_json); |
} |
bool PromoResourceService::CanShowNotificationPromo(Profile* profile) { |
- NotificationPromo notification_promo(profile->GetPrefs(), NULL); |
- notification_promo.InitFromPrefs(); |
- return notification_promo.CanShow(); |
+ NotificationPromo* notification_promo = |
achuithb
2011/11/16 20:33:11
You are leaking NotificationPromo here. Please do:
Cait (Slow)
2011/11/16 23:05:24
Done.
|
+ NotificationPromo::Factory(profile, NULL); |
+ notification_promo->InitFromPrefs(); |
+ return notification_promo->CanShow(); |
} |
void PromoResourceService::UnpackWebStoreSignal( |