Modify confirm-password-change dialog to prompt less
Currently the dialog always prompts for both passwords (the old one once, and the new one twice). This change modifies it to only ask for passwords that were not scraped. Details: If no passwords are scraped, both prompts are show immediately. If the wrong old password is then entered, the same prompts are shown again with "Incorrect password" next to the old password prompt. If both passwords are scraped, a spinner is shown immediately. If the old password scraped then fails to unlock cryptohome, then the old-password prompt is shown as below. If only the new password is scraped, then only the old password prompt is shown. If the wrong old password is then entered, the same prompt is shown again with "Incorrect password" next to it. If only the old password is scraped, then only the new password prompt is shown. Once the new password has been entered consistently, if the old password scraped then fails to unlock cryptohome, then the dialog is reshown but now with an old password prompt added. If the old password is then entered incorrectly, then as usual, the "Incorrect password" text will be shown next to that prompt. The dialog is sized appropriately when first shown to make room for the prompts that it contains. In the case that a new prompt is added, it resizes itself. Bug: 930109 Change-Id: I89f326ce50f4b0543c5053af25cae618b0c8ee92 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724080 Commit-Queue: A Olsen <olsen@chromium.org> Reviewed-by:Roman Sorokin [CET] <rsorokin@chromium.org> Cr-Commit-Position: refs/heads/master@{#685184}
Showing
Please register or sign in to comment