Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: components/proximity_auth/unlock_manager_impl.h

Issue 2973243002: Adding pref to store the user-selected proximity threshold. (Closed)
Patch Set: Fixing merge issues Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/unlock_manager_impl.h
diff --git a/components/proximity_auth/unlock_manager_impl.h b/components/proximity_auth/unlock_manager_impl.h
index c880844c0c3684f0ed863f4dd81d608fc5da3b2b..e37e7085e3bae8e26f4d49163a1d1fe0e138d867 100644
--- a/components/proximity_auth/unlock_manager_impl.h
+++ b/components/proximity_auth/unlock_manager_impl.h
@@ -27,6 +27,7 @@ namespace proximity_auth {
class Messenger;
class ProximityAuthClient;
+class ProximityAuthPrefManager;
class ProximityMonitor;
// The unlock manager is responsible for controlling the lock screen UI based on
@@ -43,7 +44,8 @@ class UnlockManagerImpl : public UnlockManager,
// The |proximity_auth_client| is not owned and should outlive the constructed
// unlock manager.
UnlockManagerImpl(ProximityAuthSystem::ScreenlockType screenlock_type,
- ProximityAuthClient* proximity_auth_client);
+ ProximityAuthClient* proximity_auth_client,
+ ProximityAuthPrefManager* pref_manager);
~UnlockManagerImpl() override;
// UnlockManager:
@@ -56,7 +58,8 @@ class UnlockManagerImpl : public UnlockManager,
// Creates a ProximityMonitor instance for the given |connection|.
// Exposed for testing.
virtual std::unique_ptr<ProximityMonitor> CreateProximityMonitor(
- cryptauth::Connection* connection);
+ cryptauth::Connection* connection,
+ ProximityAuthPrefManager* pref_manager);
private:
// The possible lock screen states for the remote device.
@@ -155,6 +158,9 @@ class UnlockManagerImpl : public UnlockManager,
// Used to call into the embedder. Expected to outlive |this| instance.
ProximityAuthClient* proximity_auth_client_;
+ // Used to access the common prefs. Expected to outlive |this| instance.
+ ProximityAuthPrefManager* pref_manager_;
+
// Whether the screen is currently locked.
bool is_locked_;
« no previous file with comments | « components/proximity_auth/proximity_monitor_impl_unittest.cc ('k') | components/proximity_auth/unlock_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698