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

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

Issue 2204943002: Integrate registry_hash_store_contents with the rest of tracked prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a lost include statement Created 4 years, 4 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/tracked_preferences_migration.cc
diff --git a/components/user_prefs/tracked/tracked_preferences_migration.cc b/components/user_prefs/tracked/tracked_preferences_migration.cc
index 5381c8e20be933a82d674fb95040432d66cb5a42..50299141ed5927897b69138773c70c57d8269580 100644
--- a/components/user_prefs/tracked/tracked_preferences_migration.cc
+++ b/components/user_prefs/tracked/tracked_preferences_migration.cc
@@ -120,10 +120,9 @@ void ScheduleSourcePrefStoreCleanup(
void CleanupMigratedHashes(const std::set<std::string>& migrated_pref_names,
PrefHashStore* origin_pref_hash_store,
base::DictionaryValue* origin_pref_store) {
+ DictionaryHashStoreContents dictionary_contents(origin_pref_store);
std::unique_ptr<PrefHashStoreTransaction> transaction(
- origin_pref_hash_store->BeginTransaction(
- std::unique_ptr<HashStoreContents>(
- new DictionaryHashStoreContents(origin_pref_store))));
+ origin_pref_hash_store->BeginTransaction(&dictionary_contents));
for (std::set<std::string>::const_iterator it = migrated_pref_names.begin();
it != migrated_pref_names.end();
++it) {
@@ -143,9 +142,9 @@ void MigratePrefsFromOldToNewStore(const std::set<std::string>& pref_names,
bool* new_store_altered) {
const base::DictionaryValue* old_hash_store_contents =
DictionaryHashStoreContents(old_store).GetContents();
+ DictionaryHashStoreContents dictionary_contents(new_store);
std::unique_ptr<PrefHashStoreTransaction> new_hash_store_transaction(
- new_hash_store->BeginTransaction(std::unique_ptr<HashStoreContents>(
- new DictionaryHashStoreContents(new_store))));
+ new_hash_store->BeginTransaction(&dictionary_contents));
for (std::set<std::string>::const_iterator it = pref_names.begin();
it != pref_names.end();

Powered by Google App Engine
This is Rietveld 408576698