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

Unified Diff: components/prefs/pref_registry.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/pref_registry.cc
diff --git a/components/prefs/pref_registry.cc b/components/prefs/pref_registry.cc
index b7c91de53c1ad2ae2ee9cafcc278bf7c28851243..92d161e8b04fbb34ec142f36c19814a0a35f6a9a 100644
--- a/components/prefs/pref_registry.cc
+++ b/components/prefs/pref_registry.cc
@@ -5,6 +5,7 @@
#include "components/prefs/pref_registry.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "components/prefs/default_pref_store.h"
@@ -46,7 +47,7 @@ void PrefRegistry::SetDefaultPrefValue(const std::string& pref_name,
DCHECK(value->IsType(current_value->GetType()))
<< "Wrong type for new default: " << pref_name;
- defaults_->ReplaceDefaultValue(pref_name, make_scoped_ptr(value));
+ defaults_->ReplaceDefaultValue(pref_name, base::WrapUnique(value));
}
void PrefRegistry::RegisterPreference(const std::string& path,
@@ -61,7 +62,7 @@ void PrefRegistry::RegisterPreference(const std::string& path,
DCHECK(!ContainsKey(registration_flags_, path)) <<
"Trying to register a previously registered pref: " << path;
- defaults_->SetDefaultValue(path, make_scoped_ptr(default_value));
+ defaults_->SetDefaultValue(path, base::WrapUnique(default_value));
if (flags != NO_REGISTRATION_FLAGS)
registration_flags_[path] = flags;
}

Powered by Google App Engine
This is Rietveld 408576698