[go: nahoru, domu]

Add debug logging to identify cause of crash

This CL adds excessive logging to understand the action sequence
behind triggering second attempt in LoginScreenController before
first one is finished and resolved.

Bug: 1339004
Change-Id: I161310b127ee09581fde21e8cedf757ddbddfac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3765689
Commit-Queue: Denis Kuznetsov <antrim@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1024812}
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index 149df804..5015e30 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -116,6 +116,7 @@
     case ForceFailAuth::kDelayed:
       // Set a dummy authentication stage so that |IsAuthenticating| returns
       // true.
+      LOG(WARNING) << "crbug.com/1339004 : Dummy auth state";
       authentication_stage_ = AuthenticationStage::kDoAuthenticate;
       base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
           FROM_HERE,
@@ -126,6 +127,7 @@
       return;
   }
 
+  LOG(WARNING) << "crbug.com/1339004 : started authentication";
   authentication_stage_ = AuthenticationStage::kDoAuthenticate;
 
   // Checking if the password is only formed of numbers with base::StringToInt
@@ -466,8 +468,10 @@
 void LoginScreenController::OnAuthenticateComplete(
     OnAuthenticateCallback callback,
     bool success) {
+  LOG(WARNING) << "crbug.com/1339004 : authentication complete";
   authentication_stage_ = AuthenticationStage::kUserCallback;
   std::move(callback).Run(absl::make_optional<bool>(success));
+  LOG(WARNING) << "crbug.com/1339004 : triggered callback";
   authentication_stage_ = AuthenticationStage::kIdle;
 
   // During smart card login flow, multiple security token requests can be made.