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

Unified Diff: chrome/browser/prefs/profile_pref_store_manager.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: Experiment with giving two transactions to EnforceAndReport 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: chrome/browser/prefs/profile_pref_store_manager.cc
diff --git a/chrome/browser/prefs/profile_pref_store_manager.cc b/chrome/browser/prefs/profile_pref_store_manager.cc
index faba02c8c1afb9a9bf0bc892bdd978d658fd4eb2..0253566293793d55848b8c2be4bbab10b15dfd52 100644
--- a/chrome/browser/prefs/profile_pref_store_manager.cc
+++ b/chrome/browser/prefs/profile_pref_store_manager.cc
@@ -108,11 +108,13 @@ PersistentPrefStore* ProfilePrefStoreManager::CreateProfilePrefStore(
}
std::unique_ptr<PrefHashFilter> unprotected_pref_hash_filter(
- new PrefHashFilter(GetPrefHashStore(false), unprotected_configuration,
- base::Closure(), validation_delegate,
- reporting_ids_count_, false));
+ new PrefHashFilter(
+ GetPrefHashStore(false), MaybeGetRegistryPrefHashStore(),
+ unprotected_configuration, profile_path_, base::Closure(),
+ validation_delegate, reporting_ids_count_, false));
std::unique_ptr<PrefHashFilter> protected_pref_hash_filter(new PrefHashFilter(
- GetPrefHashStore(true), protected_configuration, on_reset_on_load,
+ GetPrefHashStore(true), MaybeGetRegistryPrefHashStore(),
+ protected_configuration, profile_path_, on_reset_on_load,
validation_delegate, reporting_ids_count_, true));
PrefHashFilter* raw_unprotected_pref_hash_filter =
@@ -158,12 +160,10 @@ bool ProfilePrefStoreManager::InitializePrefsFromMasterPrefs(
if (kPlatformSupportsPreferenceTracking) {
copy.reset(master_prefs.DeepCopy());
to_serialize = copy.get();
- PrefHashFilter(GetPrefHashStore(false),
- tracking_configuration_,
- base::Closure(),
- NULL,
- reporting_ids_count_,
- false).Initialize(copy.get());
+ PrefHashFilter(GetPrefHashStore(false), MaybeGetRegistryPrefHashStore(),
+ tracking_configuration_, profile_path_, base::Closure(),
+ NULL, reporting_ids_count_, false)
+ .Initialize(copy.get());
}
// This will write out to a single combined file which will be immediately
@@ -189,3 +189,15 @@ std::unique_ptr<PrefHashStore> ProfilePrefStoreManager::GetPrefHashStore(
return std::unique_ptr<PrefHashStore>(
new PrefHashStoreImpl(seed_, device_id_, use_super_mac));
}
+
+std::unique_ptr<PrefHashStore>
+ProfilePrefStoreManager::MaybeGetRegistryPrefHashStore() {
+ DCHECK(kPlatformSupportsPreferenceTracking);
+#if defined(OS_WIN)
+ return std::unique_ptr<PrefHashStore>(
+ new PrefHashStoreImpl("ChromiumRegistryHashStoreValidationSeed",
+ device_id_, false /* use_super_mac */));
+#else
+ return nullptr;
+#endif
+}

Powered by Google App Engine
This is Rietveld 408576698