Index: components/prefs/pref_registry.cc |
diff --git a/components/prefs/pref_registry.cc b/components/prefs/pref_registry.cc |
index 63b5e6a823eb0ace7a7280aae3efb36bc3ece547..e80d03c46d33e5f33c596396aed0b802ffe4f53c 100644 |
--- a/components/prefs/pref_registry.cc |
+++ b/components/prefs/pref_registry.cc |
@@ -4,6 +4,8 @@ |
#include "components/prefs/pref_registry.h" |
+#include <utility> |
+ |
#include "base/logging.h" |
#include "base/memory/ptr_util.h" |
#include "base/stl_util.h" |
@@ -50,9 +52,10 @@ void PrefRegistry::SetDefaultPrefValue(const std::string& pref_name, |
defaults_->ReplaceDefaultValue(pref_name, base::WrapUnique(value)); |
} |
-void PrefRegistry::RegisterPreference(const std::string& path, |
- base::Value* default_value, |
- uint32_t flags) { |
+void PrefRegistry::RegisterPreference( |
+ const std::string& path, |
+ std::unique_ptr<base::Value> default_value, |
+ uint32_t flags) { |
base::Value::Type orig_type = default_value->GetType(); |
DCHECK(orig_type != base::Value::Type::NONE && |
orig_type != base::Value::Type::BINARY) << |
@@ -62,7 +65,7 @@ void PrefRegistry::RegisterPreference(const std::string& path, |
DCHECK(!base::ContainsKey(registration_flags_, path)) |
<< "Trying to register a previously registered pref: " << path; |
- defaults_->SetDefaultValue(path, base::WrapUnique(default_value)); |
+ defaults_->SetDefaultValue(path, std::move(default_value)); |
if (flags != NO_REGISTRATION_FLAGS) |
registration_flags_[path] = flags; |
} |