Chromium Code Reviews| Index: chrome/browser/prefs/pref_hash_store_impl.cc |
| diff --git a/chrome/browser/prefs/pref_hash_store_impl.cc b/chrome/browser/prefs/pref_hash_store_impl.cc |
| index 205102cecc4a70c3fd6667aa700a73fd7f83f714..6b3e7647ad43a495d727dbd68c4ffb21d2fbe413 100644 |
| --- a/chrome/browser/prefs/pref_hash_store_impl.cc |
| +++ b/chrome/browser/prefs/pref_hash_store_impl.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/metrics/histogram.h" |
| #include "base/prefs/pref_registry_simple.h" |
| #include "base/prefs/pref_service.h" |
| +#include "base/time/time.h" |
| #include "base/values.h" |
| #include "chrome/common/pref_names.h" |
| @@ -28,6 +29,9 @@ void PrefHashStoreImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
| // Register the top level dictionary to map profile names to dictionaries of |
| // tracked preferences. |
| registry->RegisterDictionaryPref(prefs::kProfilePreferenceHashes); |
| + // Register the pref that maintains state about the last time a reset event |
| + // occurred. Used to decide whether to show UI. |
| + registry->RegisterInt64Pref(prefs::kProfilePreferenceResetTime, 0L); |
| } |
| void PrefHashStoreImpl::Reset() { |
| @@ -161,6 +165,11 @@ void PrefHashStoreImpl::StoreSplitHash( |
| } |
| } |
| +void PrefHashStoreImpl::RecordResetEvent() { |
|
gab
2014/02/05 15:23:52
I think this method belongs on TrackedPreferenceHe
robertshield
2014/02/06 18:56:50
Erik convinced me it should go on PrefHashFilter.
|
| + local_state_->SetInt64(prefs::kProfilePreferenceResetTime, |
| + base::Time::Now().ToInternalValue()); |
| +} |
| + |
| void PrefHashStoreImpl::ClearPath(const std::string& path, |
| DictionaryPrefUpdate* update) { |
| base::DictionaryValue* hashes_dict = NULL; |