Commit 5e71eae7 authored by dpapad's avatar dpapad Committed by Commit Bot

Settings: Exclude password check subpage from search when disabled.

This fixes a runtime error thrown, when the search algorithm would
force-render the password check subpage even when the PasswordCheck
feature is not enabled.

Fixed: 1086649
Change-Id: I82ed400713c85fa8c1a7fdd167a7219cebc5e731
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216536Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: dpapad <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772145}
parent 1ee56a9b
......@@ -37,7 +37,8 @@
</passwords-section>
</settings-subpage>
</template>
<template is="dom-if" route-path="/passwords/check">
<template is="dom-if" route-path="/passwords/check"
no-search="[[!enablePasswordCheck_]]">
<settings-subpage
associated-control="[[$$('#passwordManagerButton')]]"
page-title="$i18n{checkPasswords}"
......
......@@ -62,7 +62,13 @@ Polymer({
passwordManagerSubLabel_: {
type: String,
computed: 'computePasswordManagerSubLabel_(compromisedPasswordsCount)',
}
},
/** @private */
enablePasswordCheck_: {
type: Boolean,
value: () => loadTimeData.getBoolean('enablePasswordCheck'),
},
},
/**
......@@ -97,11 +103,11 @@ Polymer({
/**
* @return {string} The sub-title message indicating the result of password
* check.
* check.
* @private
*/
computePasswordManagerSubLabel_() {
if (!loadTimeData.getBoolean('enablePasswordCheck')) {
if (!this.enablePasswordCheck_) {
return '';
}
......
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