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

Unified Diff: components/proximity_auth/proximity_auth_system.cc

Issue 2899803003: Do not destroy the life cycle when the user is invalid. (Closed)
Patch Set: fixing tests 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 | « no previous file | 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 3386f14e5123ae06d6bf70001cf14e969924316d..f2b9d40957c66f35ac06c764dfd766e16e68fbe7 100644
--- a/components/proximity_auth/proximity_auth_system.cc
+++ b/components/proximity_auth/proximity_auth_system.cc
@@ -117,7 +117,10 @@ void ProximityAuthSystem::OnLifeCycleStateChanged(
void ProximityAuthSystem::OnScreenDidLock(
ScreenlockBridge::LockHandler::ScreenType screen_type) {
- OnFocusedUserChanged(ScreenlockBridge::Get()->focused_account_id());
+ const AccountId& focused_account_id =
+ ScreenlockBridge::Get()->focused_account_id();
+ if (focused_account_id.is_valid())
+ OnFocusedUserChanged(focused_account_id);
}
void ProximityAuthSystem::OnScreenDidUnlock(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698