Index: chrome/browser/web_resource/notification_promo.h |
diff --git a/chrome/browser/web_resource/notification_promo.h b/chrome/browser/web_resource/notification_promo.h |
index f3b2c5bd8e17b406242cd270f7d4a2b998d32453..333912555eb6d4c0fd0b5dd938f3199e666da892 100644 |
--- a/chrome/browser/web_resource/notification_promo.h |
+++ b/chrome/browser/web_resource/notification_promo.h |
@@ -18,9 +18,8 @@ class DictionaryValue; |
class ListValue; |
} |
-class PrefService; |
+class PrefServiceSimple; |
class PrefServiceSyncable; |
-class Profile; |
// Helper class for PromoResourceService that parses promo notification info |
// from json or prefs. |
@@ -35,7 +34,7 @@ class NotificationPromo { |
MOBILE_NTP_SYNC_PROMO, |
}; |
- explicit NotificationPromo(Profile* profile); |
+ explicit NotificationPromo(PrefServiceSimple* prefs); |
~NotificationPromo(); |
// Initialize from json/prefs. |
@@ -52,10 +51,10 @@ class NotificationPromo { |
// Helpers for NewTabPageHandler. |
// Mark the promo as closed when the user dismisses it. |
- static void HandleClosed(Profile* profile, PromoType promo_type); |
+ static void HandleClosed(PrefServiceSimple* prefs, PromoType promo_type); |
// Mark the promo has having been viewed. This returns true if views |
// exceeds the maximum allowed. |
- static bool HandleViewed(Profile* profile, PromoType promo_type); |
+ static bool HandleViewed(PrefServiceSimple* prefs, PromoType promo_type); |
bool new_notification() const { return new_notification_; } |
@@ -66,6 +65,7 @@ class NotificationPromo { |
} |
// Register preferences. |
+ static void RegisterPrefs(PrefServiceSimple* local_state); |
static void RegisterUserPrefs(PrefServiceSyncable* prefs); |
private: |
@@ -90,11 +90,7 @@ class NotificationPromo { |
// When max_views_ is 0, we don't cap the number of views. |
bool ExceedsMaxViews() const; |
- // True if this promo is not targeted to G+ users, or if this is a G+ user. |
- bool IsGPlusRequired() const; |
- |
- Profile* profile_; |
- PrefService* prefs_; |
+ PrefServiceSimple* prefs_; |
PromoType promo_type_; |
std::string promo_text_; |
@@ -118,8 +114,6 @@ class NotificationPromo { |
int views_; |
bool closed_; |
- bool gplus_required_; |
- |
bool new_notification_; |
DISALLOW_COPY_AND_ASSIGN(NotificationPromo); |