[go: nahoru, domu]

Refactoring: Separate code flows for Recovery and simple reauth

With introduction of Local Passwords there are going to be some
difference between Reauth with password change detection and Recovery
flows.

This CL separates code paths for starting these two flows at
LoginScreenClient level.

Bug: b/291808450
Change-Id: I5bc9378cc4059a0f219dc5e7b9afd6387778b518
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5017756
Reviewed-by: Istvan Nagy <iscsi@google.com>
Auto-Submit: Denis Kuznetsov <antrim@chromium.org>
Commit-Queue: Istvan Nagy <iscsi@google.com>
Cr-Commit-Position: refs/heads/main@{#1222413}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index 73257425..485a96b 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -244,6 +244,14 @@
   client_->ShowGaiaSignin(prefilled_account);
 }
 
+void LoginScreenController::StartUserRecovery(
+    const AccountId& account_to_recover) {
+  if (!client_) {
+    return;
+  }
+  client_->StartUserRecovery(account_to_recover);
+}
+
 void LoginScreenController::ShowOsInstallScreen() {
   if (!client_) {
     return;