It appears that in uncurtained session, WTS creates a single console
session whenever the login screen is shown, and the same session will
be used after the user has signed in. This is problematic for the
client to determine the URL forwarder state when the user has not
logged in, since:
* The host can't determine the state when the user is in login screen
due to the lack of the user context
* DesktopSessionAgent isn't recreated after the user is logged in, so
it won't report the URL forwarder state at that point where the user
context becomes known
This CL prevents this issue by making the IsUrlForwarderSetUp call wait
for the user to log in. In curtain mode, a new session will be created
when the user logs in, so this logic isn't very helpful for that case,
but it still prevents the desktop process from reporting NOT_SET_UP
when the user context is not known; the relaunched desktop process will
report the correct state.
This will also require client side change that removes the timeout and
hides the checkbox when the IsUrlForwarderSetUp response is pending.
Bug: b:183135000
Change-Id: Ic492e0d8361d9d9ae77f1032c7f964bc5f182bd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3108516
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#914936}