Fix race condition between account picker and GAIA sign-in screen
commit888ae048c28ab51a82c7ab6743a75879cf538ae9
authorbartfab <bartfab@chromium.org>
Tue, 11 Nov 2014 16:13:06 +0000 (11 08:13 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Nov 2014 16:13:21 +0000 (11 16:13 +0000)
tree5c848fc034dc8982fef3e0c54209e16877843767
parentd7fb417c35f3f3f893531f4de15e50888446d9be
Fix race condition between account picker and GAIA sign-in screen

SigninScreenHandler determines whether the account picker or the GAIA
sign-in screen should be shown. However, the GAIA sign-in screen shows
asynchronously, which causes a race condition. The GAIA sign-in screen
may finish showing after the SigninScreenHandler has decided to switch
to the account picker instead.

This race is causing two DeviceLocalAccountTest.* tests to flake on the
Chrome OS ASan/LSan bots.

BUG=432119
TEST=DeviceLocalAccountTest.* no longer flakes

Review URL: https://codereview.chromium.org/718623003

Cr-Commit-Position: refs/heads/master@{#303656}
chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc