| 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 c8c637c0cf2b8869ce7a8c40e334d6f952b7801a..f5c21ac3bf1f6af14881ee0bc29a3d9025f8b189 100644
|
| --- a/components/proximity_auth/proximity_auth_pref_manager.cc
|
| +++ b/components/proximity_auth/proximity_auth_pref_manager.cc
|
| @@ -9,6 +9,8 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/values.h"
|
| +#include "chrome/common/pref_names.h"
|
| +#include "components/pref_registry/pref_registry_syncable.h"
|
| #include "components/prefs/pref_registry_simple.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "components/prefs/scoped_user_pref_update.h"
|
| @@ -27,6 +29,9 @@ void ProximityAuthPrefManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
| registry->RegisterInt64Pref(prefs::kProximityAuthLastPasswordEntryTimestampMs,
|
| 0L);
|
| registry->RegisterDictionaryPref(prefs::kProximityAuthRemoteBleDevices);
|
| + registry->RegisterIntegerPref(
|
| + ::prefs::kEasyUnlockProximityThreshold, 1,
|
| + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
| }
|
|
|
| bool ProximityAuthPrefManager::HasDeviceWithAddress(
|
| @@ -121,4 +126,12 @@ const base::DictionaryValue* ProximityAuthPrefManager::GetRemoteBleDevices()
|
| return pref_service_->GetDictionary(prefs::kProximityAuthRemoteBleDevices);
|
| }
|
|
|
| +void ProximityAuthPrefManager::SetProximityThreshold(int value) {
|
| + pref_service_->SetInteger(::prefs::kEasyUnlockProximityThreshold, value);
|
| +}
|
| +
|
| +int ProximityAuthPrefManager::GetProximityThreshold() const {
|
| + return pref_service_->GetInteger(::prefs::kEasyUnlockProximityThreshold);
|
| +}
|
| +
|
| } // namespace proximity_auth
|
|
|