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

Unified Diff: chrome/browser/web_resource/notification_promo.h

Issue 10860025: Remove promotion-type-specific JSON handling from NotificationPromo (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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/notification_promo.h
diff --git a/chrome/browser/web_resource/notification_promo.h b/chrome/browser/web_resource/notification_promo.h
index e46da99b350cdaaee0b8052da8c314edc8644a68..71133689f57786edc5b4f5fc9b13d40b5cc8d8d4 100644
--- a/chrome/browser/web_resource/notification_promo.h
+++ b/chrome/browser/web_resource/notification_promo.h
@@ -59,13 +59,10 @@ class NotificationPromo {
bool new_notification() const { return new_notification_; }
const std::string& promo_text() const { return promo_text_; }
-#if defined(OS_ANDROID) || defined(OS_IOS)
- const std::string& promo_text_long() const { return promo_text_long_; }
- const std::string& promo_action_type() const { return promo_action_type_; }
- const base::ListValue* promo_action_args() const {
- return promo_action_args_.get();
+ PromoType promo_type() const { return promo_type_; }
+ const base::DictionaryValue* promo_payload() const {
+ return promo_payload_.get();
}
-#endif // defined(OS_ANDROID) || defined(OS_IOS)
// Register preferences.
static void RegisterUserPrefs(PrefService* prefs);
@@ -73,6 +70,7 @@ class NotificationPromo {
private:
// For testing.
friend class NotificationPromoTest;
+ friend class NotificationPromoMobileNtpTest;
// Check if this promo notification is new based on start/end times,
// and trigger events accordingly.
@@ -100,11 +98,7 @@ class NotificationPromo {
PromoType promo_type_;
std::string promo_text_;
-#if defined(OS_ANDROID) || defined(OS_IOS)
- std::string promo_text_long_;
- std::string promo_action_type_;
- scoped_ptr<base::ListValue> promo_action_args_;
-#endif // defined(OS_ANDROID) || defined(OS_IOS)
+ scoped_ptr<const base::DictionaryValue> promo_payload_;
achuithb 2012/08/17 22:55:12 Let's add a comment here saying that this is curre
aruslan 2012/08/20 15:36:53 Done.
double start_;
double end_;
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.cc » ('j') | chrome/browser/web_resource/notification_promo.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698