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

Unified Diff: components/prefs/in_memory_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/precache/core/precache_fetcher.cc ('k') | components/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/in_memory_pref_store_unittest.cc
diff --git a/components/prefs/in_memory_pref_store_unittest.cc b/components/prefs/in_memory_pref_store_unittest.cc
index d8467945611c156ea7889f62c2dd2dc3d844d363..a31757d796aad3b3830c20386a7ad156cfcb5629 100644
--- a/components/prefs/in_memory_pref_store_unittest.cc
+++ b/components/prefs/in_memory_pref_store_unittest.cc
@@ -28,7 +28,7 @@ TEST_F(InMemoryPrefStoreTest, SetGetValue) {
EXPECT_FALSE(store_->GetValue(kTestPref, &value));
EXPECT_FALSE(store_->GetMutableValue(kTestPref, &mutable_value));
- store_->SetValue(kTestPref, base::WrapUnique(new base::FundamentalValue(42)),
+ store_->SetValue(kTestPref, base::MakeUnique<base::FundamentalValue>(42),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
EXPECT_TRUE(store_->GetValue(kTestPref, &value));
EXPECT_TRUE(base::FundamentalValue(42).Equals(value));
@@ -58,7 +58,7 @@ TEST_F(InMemoryPrefStoreTest, CallObserver) {
store_->AddObserver(&observer_);
// Triggers on SetValue.
- store_->SetValue(kTestPref, base::WrapUnique(new base::FundamentalValue(42)),
+ store_->SetValue(kTestPref, base::MakeUnique<base::FundamentalValue>(42),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
observer_.VerifyAndResetChangedKey(kTestPref);
@@ -68,7 +68,7 @@ TEST_F(InMemoryPrefStoreTest, CallObserver) {
// But not SetValueSilently.
store_->SetValueSilently(kTestPref,
- base::WrapUnique(new base::FundamentalValue(42)),
+ base::MakeUnique<base::FundamentalValue>(42),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
EXPECT_EQ(0u, observer_.changed_keys.size());
@@ -80,7 +80,7 @@ TEST_F(InMemoryPrefStoreTest, CallObserver) {
// Doesn't make call on removed observers.
store_->RemoveObserver(&observer_);
- store_->SetValue(kTestPref, base::WrapUnique(new base::FundamentalValue(42)),
+ store_->SetValue(kTestPref, base::MakeUnique<base::FundamentalValue>(42),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
store_->RemoveValue(kTestPref, WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
EXPECT_EQ(0u, observer_.changed_keys.size());
« no previous file with comments | « components/precache/core/precache_fetcher.cc ('k') | components/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698