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

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

Issue 2838893002: Remove base::ListValue::Set(size_t, base::Value*) (Closed)
Patch Set: Fix Compilation Error 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 | « extensions/common/extension_l10n_util.cc ('k') | ipc/ipc_message_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_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";
« no previous file with comments | « extensions/common/extension_l10n_util.cc ('k') | ipc/ipc_message_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698