Fix the failing tests on win-asan for [1]. Seems like returning an empty "username" as part of
MakeUserNameForAccount() doesn't fail creation of user on some of the windows instances.

This fix explicitly returns a failure when we want to fail the login UI instead of depending on
"create user" to fail for "empty username" instead.

Note that currently the error_text is set as IDS_INTERNAL_ERROR_BASE. Explicit error handling
with appropriate error messages would be done in a followup change (already filed a bug for it).


Bug: 976543
Change-Id: Ic4d92f5ef647d0f3cd5fd50c1f52b588c94a3afd
Commit-Queue: Rakesh Soma <>
Reviewed-by: Tien Mai <>
Cr-Commit-Position: refs/heads/master@{#672133}
10 files changed