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

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)
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "chrome/browser/browser_process.h"
@@ -66,16 +67,16 @@
}
void NewTabPageHandler::HandleCloseNotificationPromo(const ListValue* args) {
- NotificationPromo notification_promo(
- Profile::FromWebUI(web_ui())->GetPrefs(), NULL);
- notification_promo.HandleClosed();
+ scoped_refptr<NotificationPromo> notification_promo =
+ NotificationPromo::Create(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())
+ scoped_refptr<NotificationPromo> notification_promo =
+ NotificationPromo::Create(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