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

Unified Diff: components/prefs/default_pref_store_unittest.cc

Issue 1907043002: Convert //components/prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes Created 4 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: components/prefs/default_pref_store_unittest.cc
diff --git a/components/prefs/default_pref_store_unittest.cc b/components/prefs/default_pref_store_unittest.cc
index 06cabc01b1471d7773b1c512f662740576225d73..af6a074857501e2432d0b9742f3eb48809bfaf42 100644
--- a/components/prefs/default_pref_store_unittest.cc
+++ b/components/prefs/default_pref_store_unittest.cc
@@ -54,17 +54,17 @@ TEST(DefaultPrefStoreTest, NotifyPrefValueChanged) {
// Setting a default value shouldn't send a change notification.
pref_store->SetDefaultValue(kPrefKey,
- scoped_ptr<Value>(new StringValue("foo")));
+ std::unique_ptr<Value>(new StringValue("foo")));
EXPECT_EQ(0, observer.change_count());
// Replacing the default value should send a change notification...
- pref_store->ReplaceDefaultValue(kPrefKey,
- scoped_ptr<Value>(new StringValue("bar")));
+ pref_store->ReplaceDefaultValue(
+ kPrefKey, std::unique_ptr<Value>(new StringValue("bar")));
EXPECT_EQ(1, observer.change_count());
// But only if the value actually changed.
- pref_store->ReplaceDefaultValue(kPrefKey,
- scoped_ptr<Value>(new StringValue("bar")));
+ pref_store->ReplaceDefaultValue(
+ kPrefKey, std::unique_ptr<Value>(new StringValue("bar")));
EXPECT_EQ(1, observer.change_count());
}

Powered by Google App Engine
This is Rietveld 408576698