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

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 108876)
+++ chrome/browser/web_resource/promo_resource_service.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/rand_util.h"
#include "base/string_number_conversions.h"
+#include "base/string_split.h"
#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -215,14 +216,16 @@
void PromoResourceService::UnpackNotificationSignal(
const DictionaryValue& parsed_json) {
- NotificationPromo notification_promo(prefs_, this);
- notification_promo.InitFromJson(parsed_json);
+ NotificationPromo* notification_promo =
achuithb 2011/11/16 20:33:11 You are leaking NotificationPromo here. Please do:
Cait (Slow) 2011/11/16 23:05:24 Done.
+ NotificationPromo::Factory(profile_, this);
+ notification_promo->InitFromJson(parsed_json);
}
bool PromoResourceService::CanShowNotificationPromo(Profile* profile) {
- NotificationPromo notification_promo(profile->GetPrefs(), NULL);
- notification_promo.InitFromPrefs();
- return notification_promo.CanShow();
+ NotificationPromo* notification_promo =
achuithb 2011/11/16 20:33:11 You are leaking NotificationPromo here. Please do:
Cait (Slow) 2011/11/16 23:05:24 Done.
+ NotificationPromo::Factory(profile, NULL);
+ notification_promo->InitFromPrefs();
+ return notification_promo->CanShow();
}
void PromoResourceService::UnpackWebStoreSignal(

Powered by Google App Engine
This is Rietveld 408576698