Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc |
=================================================================== |
--- chrome/browser/ui/webui/ntp/new_tab_page_handler.cc (revision 111558) |
+++ chrome/browser/ui/webui/ntp/new_tab_page_handler.cc (working copy) |
@@ -66,16 +66,16 @@ |
} |
void NewTabPageHandler::HandleCloseNotificationPromo(const ListValue* args) { |
- NotificationPromo notification_promo( |
- Profile::FromWebUI(web_ui())->GetPrefs(), NULL); |
- notification_promo.HandleClosed(); |
+ NotificationPromo* notification_promo = NotificationPromo::Factory( |
achuithb
2011/11/27 07:48:26
This is a leak. Could you please use scoped_refptr
Cait (Slow)
2011/11/28 19:06:25
Done.
|
+ Profile::FromWebUI(web_ui()), NULL); |
+ notification_promo->HandleClosed(); |
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED); |
} |
void NewTabPageHandler::HandleNotificationPromoViewed(const ListValue* args) { |
- NotificationPromo notification_promo( |
- Profile::FromWebUI(web_ui_)->GetPrefs(), NULL); |
- if (notification_promo.HandleViewed()) |
+ NotificationPromo* notification_promo = NotificationPromo::Factory( |
achuithb
2011/11/27 07:48:26
scoped_refptr
Cait (Slow)
2011/11/28 19:06:25
Done.
|
+ Profile::FromWebUI(web_ui_), NULL); |
+ if (notification_promo->HandleViewed()) |
Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED); |
} |