| Index: components/proximity_auth/unlock_manager_impl.cc
|
| diff --git a/components/proximity_auth/unlock_manager_impl.cc b/components/proximity_auth/unlock_manager_impl.cc
|
| index 92afbacee4338f8f51a3897338f6f18cf1d18196..855347896c830e131863023607072f2c7ecc4bbf 100644
|
| --- a/components/proximity_auth/unlock_manager_impl.cc
|
| +++ b/components/proximity_auth/unlock_manager_impl.cc
|
| @@ -18,6 +18,7 @@
|
| #include "components/proximity_auth/messenger.h"
|
| #include "components/proximity_auth/metrics.h"
|
| #include "components/proximity_auth/proximity_auth_client.h"
|
| +#include "components/proximity_auth/proximity_auth_pref_manager.h"
|
| #include "components/proximity_auth/proximity_monitor_impl.h"
|
| #include "device/bluetooth/bluetooth_adapter_factory.h"
|
|
|
| @@ -80,6 +81,8 @@ metrics::RemoteSecuritySettingsState GetRemoteSecuritySettingsState(
|
|
|
| } // namespace
|
|
|
| +class ProximityAuthPrefManager;
|
| +
|
| UnlockManagerImpl::UnlockManagerImpl(
|
| ProximityAuthSystem::ScreenlockType screenlock_type,
|
| ProximityAuthClient* proximity_auth_client)
|
| @@ -158,7 +161,8 @@ void UnlockManagerImpl::OnLifeCycleStateChanged() {
|
| if (state == RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED) {
|
| DCHECK(life_cycle_->GetConnection());
|
| DCHECK(GetMessenger());
|
| - proximity_monitor_ = CreateProximityMonitor(life_cycle_->GetConnection());
|
| + proximity_monitor_ = CreateProximityMonitor(
|
| + life_cycle_->GetConnection(), proximity_auth_client_->GetPrefService());
|
| GetMessenger()->AddObserver(this);
|
| }
|
|
|
| @@ -326,9 +330,11 @@ void UnlockManagerImpl::OnAuthAttempted(mojom::AuthType auth_type) {
|
| }
|
|
|
| std::unique_ptr<ProximityMonitor> UnlockManagerImpl::CreateProximityMonitor(
|
| - cryptauth::Connection* connection) {
|
| + cryptauth::Connection* connection,
|
| + PrefService* pref_service) {
|
| return base::MakeUnique<ProximityMonitorImpl>(
|
| - connection, base::WrapUnique(new base::DefaultTickClock()));
|
| + connection, base::WrapUnique(new base::DefaultTickClock()),
|
| + base::MakeUnique<ProximityAuthPrefManager>(pref_service));
|
| }
|
|
|
| void UnlockManagerImpl::SendSignInChallenge() {
|
|
|