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

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

Issue 1908143002: Convert //components/user_prefs from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore the rightful glory of <windows.h> 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/user_prefs/tracked/pref_hash_store_impl.cc
diff --git a/components/user_prefs/tracked/pref_hash_store_impl.cc b/components/user_prefs/tracked/pref_hash_store_impl.cc
index 125f662f66d92d39123646953aec982481da638a..3146ac2e6c71457ba886091695fc3ac32ff25f95 100644
--- a/components/user_prefs/tracked/pref_hash_store_impl.cc
+++ b/components/user_prefs/tracked/pref_hash_store_impl.cc
@@ -20,7 +20,7 @@ class PrefHashStoreImpl::PrefHashStoreTransactionImpl
// Constructs a PrefHashStoreTransactionImpl which can use the private
// members of its |outer| PrefHashStoreImpl.
PrefHashStoreTransactionImpl(PrefHashStoreImpl* outer,
- scoped_ptr<HashStoreContents> storage);
+ std::unique_ptr<HashStoreContents> storage);
~PrefHashStoreTransactionImpl() override;
// PrefHashStoreTransaction implementation.
@@ -56,7 +56,7 @@ class PrefHashStoreImpl::PrefHashStoreTransactionImpl
}
PrefHashStoreImpl* outer_;
- scoped_ptr<HashStoreContents> contents_;
+ std::unique_ptr<HashStoreContents> contents_;
bool super_mac_valid_;
bool super_mac_dirty_;
@@ -74,19 +74,19 @@ PrefHashStoreImpl::~PrefHashStoreImpl() {
}
void PrefHashStoreImpl::set_legacy_hash_store_contents(
- scoped_ptr<HashStoreContents> legacy_hash_store_contents) {
+ std::unique_ptr<HashStoreContents> legacy_hash_store_contents) {
legacy_hash_store_contents_ = std::move(legacy_hash_store_contents);
}
-scoped_ptr<PrefHashStoreTransaction> PrefHashStoreImpl::BeginTransaction(
- scoped_ptr<HashStoreContents> storage) {
- return scoped_ptr<PrefHashStoreTransaction>(
+std::unique_ptr<PrefHashStoreTransaction> PrefHashStoreImpl::BeginTransaction(
+ std::unique_ptr<HashStoreContents> storage) {
+ return std::unique_ptr<PrefHashStoreTransaction>(
new PrefHashStoreTransactionImpl(this, std::move(storage)));
}
PrefHashStoreImpl::PrefHashStoreTransactionImpl::PrefHashStoreTransactionImpl(
PrefHashStoreImpl* outer,
- scoped_ptr<HashStoreContents> storage)
+ std::unique_ptr<HashStoreContents> storage)
: outer_(outer),
contents_(std::move(storage)),
super_mac_valid_(false),
@@ -232,7 +232,7 @@ PrefHashStoreImpl::PrefHashStoreTransactionImpl::CheckSplitValue(
void PrefHashStoreImpl::PrefHashStoreTransactionImpl::StoreSplitHash(
const std::string& path,
const base::DictionaryValue* split_value) {
- scoped_ptr<HashStoreContents::MutableDictionary> mutable_dictionary =
+ std::unique_ptr<HashStoreContents::MutableDictionary> mutable_dictionary =
contents()->GetMutableContents();
(*mutable_dictionary)->Remove(path, NULL);
« no previous file with comments | « components/user_prefs/tracked/pref_hash_store_impl.h ('k') | components/user_prefs/tracked/pref_hash_store_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698