Index: ios/chrome/browser/notification_promo_unittest.cc |
diff --git a/ios/chrome/browser/notification_promo_unittest.cc b/ios/chrome/browser/notification_promo_unittest.cc |
index 3299c13234912603fa44f8c36ee18b6625b75d52..2b3718e5fdc53d57b75c247b85c4cb1e6ea25714 100644 |
--- a/ios/chrome/browser/notification_promo_unittest.cc |
+++ b/ios/chrome/browser/notification_promo_unittest.cc |
@@ -297,14 +297,14 @@ class NotificationPromoTest : public testing::Test { |
bool closed = true; |
// Save data into old prefs structure. |
- base::DictionaryValue* ntp_promo = new base::DictionaryValue; |
+ auto ntp_promo = base::MakeUnique<base::DictionaryValue>(); |
ntp_promo->SetInteger("id", promo.promo_id_); |
ntp_promo->SetDouble("first_view_time", first_view_time); |
ntp_promo->SetInteger("views", views); |
ntp_promo->SetBoolean("closed", true); |
base::ListValue* promo_list = new base::ListValue; |
- promo_list->Set(0, ntp_promo); |
+ promo_list->Append(std::move(ntp_promo)); |
std::string promo_list_key = "mobile_ntp_whats_new_promo"; |
std::string promo_dict_key = "ios.ntppromo"; |