| Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/ntp/new_tab_page_handler.cc (revision 140104)
|
| +++ chrome/browser/ui/webui/ntp/new_tab_page_handler.cc (working copy)
|
| @@ -75,16 +75,14 @@
|
| }
|
|
|
| void NewTabPageHandler::HandleCloseNotificationPromo(const ListValue* args) {
|
| - scoped_refptr<NotificationPromo> notification_promo =
|
| - NotificationPromo::Create(Profile::FromWebUI(web_ui()), NULL);
|
| - notification_promo->HandleClosed();
|
| + NotificationPromo notification_promo(Profile::FromWebUI(web_ui()));
|
| + notification_promo.HandleClosed();
|
| Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
|
| }
|
|
|
| void NewTabPageHandler::HandleNotificationPromoViewed(const ListValue* args) {
|
| - scoped_refptr<NotificationPromo> notification_promo =
|
| - NotificationPromo::Create(Profile::FromWebUI(web_ui()), NULL);
|
| - if (notification_promo->HandleViewed())
|
| + NotificationPromo notification_promo(Profile::FromWebUI(web_ui()));
|
| + if (notification_promo.HandleViewed())
|
| Notify(chrome::NOTIFICATION_PROMO_RESOURCE_STATE_CHANGED);
|
| }
|
|
|
|
|