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

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

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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.cc ('k') | ios/chrome/browser/ui/webui/flags_ui.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 2b3718e5fdc53d57b75c247b85c4cb1e6ea25714..25b68ab103d8981c0f829ba59d20450934045b2a 100644
--- a/ios/chrome/browser/notification_promo_unittest.cc
+++ b/ios/chrome/browser/notification_promo_unittest.cc
@@ -5,6 +5,7 @@
#include <stddef.h>
#include <memory>
+#include <utility>
#include <vector>
#include "base/json/json_reader.h"
@@ -303,14 +304,14 @@ class NotificationPromoTest : public testing::Test {
ntp_promo->SetInteger("views", views);
ntp_promo->SetBoolean("closed", true);
- base::ListValue* promo_list = new base::ListValue;
+ auto promo_list = base::MakeUnique<base::ListValue>();
promo_list->Append(std::move(ntp_promo));
std::string promo_list_key = "mobile_ntp_whats_new_promo";
std::string promo_dict_key = "ios.ntppromo";
base::DictionaryValue promo_dict;
- promo_dict.Set(promo_list_key, promo_list);
+ promo_dict.Set(promo_list_key, std::move(promo_list));
local_state_.Set(promo_dict_key, promo_dict);
// Initialize promo and verify that its instance variables match the data
« no previous file with comments | « ios/chrome/browser/notification_promo.cc ('k') | ios/chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698