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

Unified Diff: services/preferences/tracked/tracked_preferences_migration.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 years, 6 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
« no previous file with comments | « services/preferences/tracked/pref_hash_store_impl_unittest.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/preferences/tracked/tracked_preferences_migration.cc
diff --git a/services/preferences/tracked/tracked_preferences_migration.cc b/services/preferences/tracked/tracked_preferences_migration.cc
index f2af336e350a08a60bcb010ffbcbf80b31267c29..61a0c80cf0b47c878cfc9db0778e63ecc5202404 100644
--- a/services/preferences/tracked/tracked_preferences_migration.cc
+++ b/services/preferences/tracked/tracked_preferences_migration.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/histogram.h"
#include "base/values.h"
@@ -164,7 +165,8 @@ void MigratePrefsFromOldToNewStore(const std::set<std::string>& pref_names,
// |new_store| having equivalently been successfully flushed to disk
// (e.g., on crash or in cases where |new_store| is read-only following
// a read error on startup).
- new_store->Set(pref_name, value_in_old_store->DeepCopy());
+ new_store->Set(pref_name,
+ base::MakeUnique<base::Value>(*value_in_old_store));
migrated_value = true;
*new_store_altered = true;
}
« no previous file with comments | « services/preferences/tracked/pref_hash_store_impl_unittest.cc ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698