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

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

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Update comments Created 3 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: services/preferences/tracked/pref_hash_filter.cc
diff --git a/services/preferences/tracked/pref_hash_filter.cc b/services/preferences/tracked/pref_hash_filter.cc
index a0b94dfff3291cb0df63ca4e27b713a0f71023ed..24dc1c37909d0c501b58e2084edf7eab37793419 100644
--- a/services/preferences/tracked/pref_hash_filter.cc
+++ b/services/preferences/tracked/pref_hash_filter.cc
@@ -201,6 +201,17 @@ PrefFilter::OnWriteCallbackPair PrefHashFilter::FilterSerializeData(
return callback_pair;
}
+void PrefHashFilter::OnStoreDeletionFromDisk() {
+ if (external_validation_hash_store_pair_) {
+ external_validation_hash_store_pair_->second.get()->Reset();
+
+ // The PrefStore will attempt to write preferences even if it's marked for
+ // deletion. Clear the external store pair to avoid re-writing to the
+ // external store.
+ external_validation_hash_store_pair_.reset();
+ }
+}
+
void PrefHashFilter::FinalizeFilterOnLoad(
const PostFilterOnLoadCallback& post_filter_on_load_callback,
std::unique_ptr<base::DictionaryValue> pref_store_contents,
« no previous file with comments | « services/preferences/tracked/pref_hash_filter.h ('k') | services/preferences/tracked/segregated_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698