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

Unified Diff: services/preferences/pref_store_manager_impl.cc

Issue 2803023005: Switch base::Value typemapping to be by value instead of by unique_ptr.
Patch Set: Created 3 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: services/preferences/pref_store_manager_impl.cc
diff --git a/services/preferences/pref_store_manager_impl.cc b/services/preferences/pref_store_manager_impl.cc
index 027134cffba035f91a8f36659bc31ea887a40d0c..dfa767f32fdc103d0680bd387df1c275a8cd3441 100644
--- a/services/preferences/pref_store_manager_impl.cc
+++ b/services/preferences/pref_store_manager_impl.cc
@@ -248,9 +248,9 @@ void PrefStoreManagerImpl::ConnectImpl(
// TODO(sammc): Once non-owning registrations are supported, disallow
// multiple owners instead of just checking for consistent defaults.
if (defaults_->GetValue(key, &old_default))
- DCHECK(old_default->Equals(default_value.get()));
+ DCHECK_EQ(*old_default, default_value);
else
- defaults_->SetDefaultValue(key, std::move(default_value));
+ defaults_->SetDefaultValue(key, default_value.CreateDeepCopy());
}
// Only connect to pref stores the client isn't already connected to.
« no previous file with comments | « services/preferences/persistent_pref_store_impl.cc ('k') | services/preferences/public/cpp/persistent_pref_store_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698