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

Unified Diff: components/proximity_auth/proximity_auth_system.cc

Issue 2918933002: [EasyUnlock] Make login work if command line flag is enabled. (Closed)
Patch Set: 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
« no previous file with comments | « components/proximity_auth/proximity_auth_system.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/proximity_auth_system.cc
diff --git a/components/proximity_auth/proximity_auth_system.cc b/components/proximity_auth/proximity_auth_system.cc
index 027a5471ff0efa716f1062f1c3f5a23c812d51f8..d44381e07fcb1b3763722e5a268c4cd69a310795 100644
--- a/components/proximity_auth/proximity_auth_system.cc
+++ b/components/proximity_auth/proximity_auth_system.cc
@@ -25,7 +25,8 @@ const int64_t kPasswordReauthPeriodHours = 20;
ProximityAuthSystem::ProximityAuthSystem(
ScreenlockType screenlock_type,
ProximityAuthClient* proximity_auth_client)
- : proximity_auth_client_(proximity_auth_client),
+ : screenlock_type_(screenlock_type),
+ proximity_auth_client_(proximity_auth_client),
unlock_manager_(
new UnlockManagerImpl(screenlock_type, proximity_auth_client)),
clock_(new base::DefaultClock()),
@@ -41,7 +42,8 @@ ProximityAuthSystem::ProximityAuthSystem(
std::unique_ptr<UnlockManager> unlock_manager,
std::unique_ptr<base::Clock> clock,
std::unique_ptr<ProximityAuthPrefManager> pref_manager)
- : proximity_auth_client_(proximity_auth_client),
+ : screenlock_type_(screenlock_type),
+ proximity_auth_client_(proximity_auth_client),
unlock_manager_(std::move(unlock_manager)),
clock_(std::move(clock)),
pref_manager_(std::move(pref_manager)),
@@ -189,6 +191,11 @@ void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) {
}
bool ProximityAuthSystem::ShouldForcePassword() {
+ // TODO(tengs): We need to properly propagate the last login time to the login
+ // screen.
+ if (screenlock_type_ == ScreenlockType::SIGN_IN)
+ return false;
+
// TODO(tengs): Put this force password reauth logic behind an enterprise
// policy. See crbug.com/724717.
int64_t now_ms = clock_->Now().ToJavaTime();
« no previous file with comments | « components/proximity_auth/proximity_auth_system.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698