Chromium Code Reviews| 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 29d6b9ab830891d3388ed91e6c14957deed32465..57310b96714eacf4c32ccde7149700b564ce7780 100644 |
| --- a/services/preferences/tracked/pref_hash_filter.cc |
| +++ b/services/preferences/tracked/pref_hash_filter.cc |
| @@ -201,6 +201,16 @@ 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 flush the preferences of a deleted profile. |
|
gab
2017/06/08 16:14:28
avoid "profile"
proberge
2017/06/08 18:32:59
Done.
|
| + // Clear the external store pair to avoid re-writing to it. |
| + external_validation_hash_store_pair_.reset(); |
| + } |
| +} |
| + |
| void PrefHashFilter::FinalizeFilterOnLoad( |
| const PostFilterOnLoadCallback& post_filter_on_load_callback, |
| std::unique_ptr<base::DictionaryValue> pref_store_contents, |