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

Unified Diff: chrome/browser/web_resource/promo_resource_service.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/web_resource/promo_resource_service.cc
===================================================================
--- chrome/browser/web_resource/promo_resource_service.cc (revision 111558)
+++ chrome/browser/web_resource/promo_resource_service.cc (working copy)
@@ -157,7 +157,7 @@
UnpackNTPSignInPromoSignal(parsed_json);
}
-void PromoResourceService::OnNewNotification(double start, double end) {
+void PromoResourceService::OnNotificationParsed(double start, double end) {
ScheduleNotification(start, end);
}
@@ -215,14 +215,16 @@
void PromoResourceService::UnpackNotificationSignal(
const DictionaryValue& parsed_json) {
- NotificationPromo notification_promo(prefs_, this);
- notification_promo.InitFromJson(parsed_json);
+ scoped_refptr<NotificationPromo> notification_promo =
+ NotificationPromo::Factory(profile_, this);
+ notification_promo->InitFromJson(parsed_json, false);
}
bool PromoResourceService::CanShowNotificationPromo(Profile* profile) {
- NotificationPromo notification_promo(profile->GetPrefs(), NULL);
- notification_promo.InitFromPrefs();
- return notification_promo.CanShow();
+ scoped_refptr<NotificationPromo> notification_promo =
+ NotificationPromo::Factory(profile, NULL);
+ notification_promo->InitFromPrefs();
+ return notification_promo->CanShow();
}
void PromoResourceService::UnpackWebStoreSignal(

Powered by Google App Engine
This is Rietveld 408576698