Index: components/policy/core/browser/url_blacklist_manager_unittest.cc |
diff --git a/components/policy/core/browser/url_blacklist_manager_unittest.cc b/components/policy/core/browser/url_blacklist_manager_unittest.cc |
index f43c04cd5c023185ce52bc015dcb2b48b9f16485..bf6d7f3967d066620b8b76b85d4b2afa83c879dd 100644 |
--- a/components/policy/core/browser/url_blacklist_manager_unittest.cc |
+++ b/components/policy/core/browser/url_blacklist_manager_unittest.cc |
@@ -223,12 +223,14 @@ TEST_P(URLBlacklistFilterToComponentsTest, FilterToComponents) { |
} |
TEST_F(URLBlacklistManagerTest, SingleUpdateForTwoPrefChanges) { |
- base::ListValue* blacklist = new base::ListValue; |
+ auto blacklist = base::MakeUnique<base::ListValue>(); |
blacklist->AppendString("*.google.com"); |
- base::ListValue* whitelist = new base::ListValue; |
+ auto whitelist = base::MakeUnique<base::ListValue>(); |
whitelist->AppendString("mail.google.com"); |
- pref_service_.SetManagedPref(policy_prefs::kUrlBlacklist, blacklist); |
- pref_service_.SetManagedPref(policy_prefs::kUrlBlacklist, whitelist); |
+ pref_service_.SetManagedPref(policy_prefs::kUrlBlacklist, |
+ std::move(blacklist)); |
+ pref_service_.SetManagedPref(policy_prefs::kUrlBlacklist, |
+ std::move(whitelist)); |
base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(1, blacklist_manager_->update_called()); |