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

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

Issue 8520009: Only show G+ promo for users logged into G+ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
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);
}
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.h » ('j') | chrome/browser/web_resource/notification_promo.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698