Index: components/proximity_auth/proximity_auth_pref_manager.cc |
diff --git a/components/proximity_auth/proximity_auth_pref_manager.cc b/components/proximity_auth/proximity_auth_pref_manager.cc |
index 7d2dbd6937b4b17e2a23274b30adc64242f660ef..c8c637c0cf2b8869ce7a8c40e334d6f952b7801a 100644 |
--- a/components/proximity_auth/proximity_auth_pref_manager.cc |
+++ b/components/proximity_auth/proximity_auth_pref_manager.cc |
@@ -24,6 +24,8 @@ ProximityAuthPrefManager::~ProximityAuthPrefManager() {} |
// static |
void ProximityAuthPrefManager::RegisterPrefs(PrefRegistrySimple* registry) { |
+ registry->RegisterInt64Pref(prefs::kProximityAuthLastPasswordEntryTimestampMs, |
+ 0L); |
registry->RegisterDictionaryPref(prefs::kProximityAuthRemoteBleDevices); |
} |
@@ -103,6 +105,16 @@ bool ProximityAuthPrefManager::RemoveDeviceWithPublicKey( |
const std::string& public_key) { |
return RemoveDeviceWithAddress(GetDeviceAddress(public_key)); |
} |
+void ProximityAuthPrefManager::SetLastPasswordEntryTimestampMs( |
+ int64_t timestamp_ms) { |
+ pref_service_->SetInt64(prefs::kProximityAuthLastPasswordEntryTimestampMs, |
+ timestamp_ms); |
+} |
+ |
+int64_t ProximityAuthPrefManager::GetLastPasswordEntryTimestampMs() const { |
+ return pref_service_->GetInt64( |
+ prefs::kProximityAuthLastPasswordEntryTimestampMs); |
+} |
const base::DictionaryValue* ProximityAuthPrefManager::GetRemoteBleDevices() |
const { |