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

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: Fix SupervisedUserWhitelistInstaller 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 05f7b0ab3890b0eb57c733df84ef35ca6d6180bb..c3d9b137b22fd5ce5689031c44c903f92931d46a 100644
--- a/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager_unittest.cc
@@ -459,8 +459,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)));
@@ -616,7 +617,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