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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager_unittest.cc

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Just rebased 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
Index: chrome/browser/prefs/profile_pref_store_manager_unittest.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
index 3e6932f615e0617f9cfe11221dc2109ee1e52903..144d4e3b136e8b0245a2824a84f47e10947cc62c 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -465,8 +465,9 @@ TEST_P(ProfilePrefStoreManagerTest, ProtectValues) {
TEST_P(ProfilePrefStoreManagerTest, InitializePrefsFromMasterPrefs) {
auto master_prefs = base::MakeUnique<base::DictionaryValue>();
- master_prefs->Set(kTrackedAtomic, new base::Value(kFoobar));
- master_prefs->Set(kProtectedAtomic, new base::Value(kHelloWorld));
+ master_prefs->Set(kTrackedAtomic, base::MakeUnique<base::Value>(kFoobar));
+ master_prefs->Set(kProtectedAtomic,
+ base::MakeUnique<base::Value>(kHelloWorld));
EXPECT_TRUE(manager_->InitializePrefsFromMasterPrefs(
prefs::CloneTrackedConfiguration(configuration_), kReportingIdCount,
std::move(master_prefs)));
@@ -622,7 +623,7 @@ TEST_P(ProfilePrefStoreManagerTest, ProtectedToUnprotected) {
// Trigger the logic that migrates it back to the unprotected preferences
// file.
pref_store_->SetValue(kProtectedAtomic,
- base::WrapUnique(new base::Value(kGoodbyeWorld)),
+ base::MakeUnique<base::Value>(kGoodbyeWorld),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
LoadExistingPrefs();
ExpectStringValueEquals(kProtectedAtomic, kGoodbyeWorld);

Powered by Google App Engine
This is Rietveld 408576698