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

Unified Diff: components/user_prefs/tracked/segregated_pref_store_unittest.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 | « components/url_matcher/url_matcher_factory.cc ('k') | components/variations/service/variations_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/tracked/segregated_pref_store_unittest.cc
diff --git a/components/user_prefs/tracked/segregated_pref_store_unittest.cc b/components/user_prefs/tracked/segregated_pref_store_unittest.cc
index f3efce22f727a73102245a1c43813c01e4f21a3f..5d32d027d5e4803a3692e5c93242e43a6901cc5e 100644
--- a/components/user_prefs/tracked/segregated_pref_store_unittest.cc
+++ b/components/user_prefs/tracked/segregated_pref_store_unittest.cc
@@ -104,10 +104,10 @@ TEST_F(SegregatedPrefStoreTest, StoreValues) {
// Properly stores new values.
segregated_store_->SetValue(kSelectedPref,
- base::WrapUnique(new base::StringValue(kValue1)),
+ base::MakeUnique<base::StringValue>(kValue1),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
segregated_store_->SetValue(kUnselectedPref,
- base::WrapUnique(new base::StringValue(kValue2)),
+ base::MakeUnique<base::StringValue>(kValue2),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
ASSERT_TRUE(selected_store_->GetValue(kSelectedPref, NULL));
@@ -129,10 +129,10 @@ TEST_F(SegregatedPrefStoreTest, StoreValues) {
TEST_F(SegregatedPrefStoreTest, ReadValues) {
selected_store_->SetValue(kSelectedPref,
- base::WrapUnique(new base::StringValue(kValue1)),
+ base::MakeUnique<base::StringValue>(kValue1),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
default_store_->SetValue(kUnselectedPref,
- base::WrapUnique(new base::StringValue(kValue2)),
+ base::MakeUnique<base::StringValue>(kValue2),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
// Works properly with values that are already there.
@@ -157,11 +157,11 @@ TEST_F(SegregatedPrefStoreTest, Observer) {
EXPECT_TRUE(observer_.initialization_success);
EXPECT_TRUE(observer_.changed_keys.empty());
segregated_store_->SetValue(kSelectedPref,
- base::WrapUnique(new base::StringValue(kValue1)),
+ base::MakeUnique<base::StringValue>(kValue1),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
observer_.VerifyAndResetChangedKey(kSelectedPref);
segregated_store_->SetValue(kUnselectedPref,
- base::WrapUnique(new base::StringValue(kValue2)),
+ base::MakeUnique<base::StringValue>(kValue2),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
observer_.VerifyAndResetChangedKey(kUnselectedPref);
}
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | components/variations/service/variations_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698