Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc

Issue 10496008: Purge legacy notification promo code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/new_tab_page_handler.cc
===================================================================
--- chrome/browser/ui/webui/ntp/new_tab_page_handler.cc (revision 140356)
+++ 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);
}
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698