OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ | 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ |
6 #define CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ | 6 #define CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bool new_notification() const { return new_notification_; } | 63 bool new_notification() const { return new_notification_; } |
64 | 64 |
65 const std::string& promo_text() const { return promo_text_; } | 65 const std::string& promo_text() const { return promo_text_; } |
66 PromoType promo_type() const { return promo_type_; } | 66 PromoType promo_type() const { return promo_type_; } |
67 const base::DictionaryValue* promo_payload() const { | 67 const base::DictionaryValue* promo_payload() const { |
68 return promo_payload_.get(); | 68 return promo_payload_.get(); |
69 } | 69 } |
70 | 70 |
71 // Register preferences. | 71 // Register preferences. |
72 static void RegisterPrefs(PrefRegistrySimple* registry); | 72 static void RegisterPrefs(PrefRegistrySimple* registry); |
73 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 73 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
74 static void MigrateUserPrefs(PrefService* user_prefs); | 74 static void MigrateUserPrefs(PrefService* user_prefs); |
75 | 75 |
76 private: | 76 private: |
77 // For testing. | 77 // For testing. |
78 friend class NotificationPromoTest; | 78 friend class NotificationPromoTest; |
79 | 79 |
80 // Check if this promo notification is new based on start/end times, | 80 // Check if this promo notification is new based on start/end times, |
81 // and trigger events accordingly. | 81 // and trigger events accordingly. |
82 void CheckForNewNotification(); | 82 void CheckForNewNotification(); |
83 | 83 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 int group_; | 121 int group_; |
122 int views_; | 122 int views_; |
123 bool closed_; | 123 bool closed_; |
124 | 124 |
125 bool new_notification_; | 125 bool new_notification_; |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(NotificationPromo); | 127 DISALLOW_COPY_AND_ASSIGN(NotificationPromo); |
128 }; | 128 }; |
129 | 129 |
130 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ | 130 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ |
OLD | NEW |