Commit 5ea94bea authored by Viktor Semeniuk's avatar Viktor Semeniuk Committed by Commit Bot

[Passwords] Show weak passwords audit - Implementation review fixes

This change shows proper string when user is signed out and there are no
weak passwords.

Bug: 1135155
Change-Id: I46da38d75f48bc230058cf9f6f36b3effd0cd45f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2448373
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814157}
parent 3f0150f6
......@@ -358,6 +358,9 @@
=1 {Found {COUNT} security issue}
other {Found {COUNT} security issues}}
</message>
<message name="IDS_SETTINGS_NO_WEAK_PASSWORDS_FOUND" desc="Description used only when user is signed out and full password check was not completed and no weak passwords found afther the password weakness check.">
No weak passwords found
</message>
<message name="IDS_SETTINGS_CHECK_PASSWORDS_AGAIN" desc="Button to start bulk password check manually in passwords check section.">
Check again
</message>
......
f98266388839e9dc46d35d665233cd4be31b7d56
\ No newline at end of file
......@@ -88,7 +88,7 @@
</div>
<div class="secondary" id="subtitle"
hidden$="[[!showsPasswordsCount_(status, leakedPasswords, weakPasswords)]]">
[[getPasswordsCount_(insecurePasswordsCount, compromisedPasswordsCount)]]
[[getPasswordsCount_(status, insecurePasswordsCount, compromisedPasswordsCount)]]
</div>
</div>
<cr-button id="controlPasswordCheckButton"
......
......@@ -661,7 +661,12 @@ Polymer({
*/
getPasswordsCount_() {
if (this.passwordsWeaknessCheckEnabled) {
return this.insecurePasswordsCount;
if (this.isSignedOut_ &&
this.leakedPasswords.length + this.weakPasswords.length === 0) {
return this.i18n('noWeakPasswords');
} else {
return this.insecurePasswordsCount;
}
} else {
return this.compromisedPasswordsCount;
}
......
......@@ -823,6 +823,7 @@ void AddAutofillStrings(content::WebUIDataSource* html_source,
IDS_SETTINGS_CHECK_PASSWORDS_ERROR_GENERIC},
{"noCompromisedCredentials",
IDS_SETTINGS_NO_COMPROMISED_CREDENTIALS_LABEL},
{"noWeakPasswords", IDS_SETTINGS_NO_WEAK_PASSWORDS_FOUND},
{"checkPasswordsAgain", IDS_SETTINGS_CHECK_PASSWORDS_AGAIN},
{"checkPasswordsAgainAfterError",
IDS_SETTINGS_CHECK_PASSWORDS_AGAIN_AFTER_ERROR},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment