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

Unified Diff: ios/chrome/browser/notification_promo.cc

Issue 2805443007: Remove unnecessary promo_type_ field from notification_promo.h/.cc. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/notification_promo.h ('k') | ios/chrome/browser/notification_promo_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/notification_promo.cc
diff --git a/ios/chrome/browser/notification_promo.cc b/ios/chrome/browser/notification_promo.cc
index e5364adadffabac55754b902d7ff888834077b61..65c132d32030ebbf791b75428d6de7d8e7b7fa34 100644
--- a/ios/chrome/browser/notification_promo.cc
+++ b/ios/chrome/browser/notification_promo.cc
@@ -34,7 +34,6 @@ const char kPrefPromoClosed[] = "closed";
NotificationPromo::NotificationPromo(PrefService* local_state)
: local_state_(local_state),
- promo_type_(NO_PROMO),
promo_payload_(new base::DictionaryValue()),
start_(0.0),
end_(0.0),
@@ -79,13 +78,10 @@ void NotificationPromo::InitFromVariations() {
}
json.Set("payload", payload.DeepCopy());
- InitFromJson(json, MOBILE_NTP_WHATS_NEW_PROMO);
+ InitFromJson(json);
}
-void NotificationPromo::InitFromJson(const base::DictionaryValue& promo,
- PromoType promo_type) {
- promo_type_ = promo_type;
-
+void NotificationPromo::InitFromJson(const base::DictionaryValue& promo) {
std::string time_str;
base::Time time;
if (promo.GetString("start", &time_str) &&
@@ -155,9 +151,7 @@ void NotificationPromo::WritePrefs(int promo_id,
DVLOG(1) << "WritePrefs " << promo_dict;
}
-void NotificationPromo::InitFromPrefs(PromoType promo_type) {
- promo_type_ = promo_type;
justincohen 2017/04/10 15:32:13 Was this data ever stored in prefs?
gchatz 2017/04/10 18:32:24 It was in the old pref structure, but not since we
-
+void NotificationPromo::InitFromPrefs() {
// Check if data is stored in the old prefs structure, and migrate it before
// reading from prefs.
MigrateOldPrefs();
« no previous file with comments | « ios/chrome/browser/notification_promo.h ('k') | ios/chrome/browser/notification_promo_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698