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

Unified Diff: components/proximity_auth/proximity_auth_system.h

Issue 2902093002: [EasyUnlock] Force user to enter their password after 20 hours. (Closed)
Patch Set: fix test Created 3 years, 7 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/proximity_auth_system.h
diff --git a/components/proximity_auth/proximity_auth_system.h b/components/proximity_auth/proximity_auth_system.h
index 31586db318f0d5f517eaeda6ca0503c7a771b028..1f98ae5d34fdd40dc5e44dccb924420ff2066165 100644
--- a/components/proximity_auth/proximity_auth_system.h
+++ b/components/proximity_auth/proximity_auth_system.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/clock.h"
#include "components/cryptauth/remote_device.h"
#include "components/proximity_auth/remote_device_life_cycle.h"
#include "components/proximity_auth/screenlock_bridge.h"
@@ -18,6 +19,7 @@
namespace proximity_auth {
class ProximityAuthClient;
+class ProximityAuthPrefManager;
class RemoteDeviceLifeCycle;
class UnlockManager;
@@ -69,7 +71,9 @@ class ProximityAuthSystem : public RemoteDeviceLifeCycle::Observer,
// Exposed for testing.
ProximityAuthSystem(ScreenlockType screenlock_type,
ProximityAuthClient* proximity_auth_client,
- std::unique_ptr<UnlockManager> unlock_manager);
+ std::unique_ptr<UnlockManager> unlock_manager,
+ std::unique_ptr<base::Clock> clock,
+ std::unique_ptr<ProximityAuthPrefManager> pref_manager);
// Creates the RemoteDeviceLifeCycle for |remote_device|.
// Exposed for testing.
@@ -92,6 +96,10 @@ class ProximityAuthSystem : public RemoteDeviceLifeCycle::Observer,
// timeout.
void ResumeAfterWakeUpTimeout();
+ // Returns true if the user should be forced to use a password to authenticate
+ // rather than EasyUnlock.
+ bool ShouldForcePassword();
+
// Lists of remote devices, keyed by user account id.
std::map<AccountId, cryptauth::RemoteDeviceList> remote_devices_map_;
@@ -105,6 +113,12 @@ class ProximityAuthSystem : public RemoteDeviceLifeCycle::Observer,
// Handles the interaction with the lock screen UI.
std::unique_ptr<UnlockManager> unlock_manager_;
+ // Used to get the current timestamp.
+ std::unique_ptr<base::Clock> clock_;
+
+ // Fetches EasyUnlock preferences.
+ std::unique_ptr<ProximityAuthPrefManager> pref_manager_;
+
// True if the system is suspended.
bool suspended_;
« no previous file with comments | « components/proximity_auth/proximity_auth_pref_names.cc ('k') | components/proximity_auth/proximity_auth_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698