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 @@ ...@@ -37,7 +37,8 @@
</passwords-section> </passwords-section>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" route-path="/passwords/check"> <template is="dom-if" route-path="/passwords/check"
no-search="[[!enablePasswordCheck_]]">
<settings-subpage <settings-subpage
associated-control="[[$$('#passwordManagerButton')]]" associated-control="[[$$('#passwordManagerButton')]]"
page-title="$i18n{checkPasswords}" page-title="$i18n{checkPasswords}"
......
...@@ -62,7 +62,13 @@ Polymer({ ...@@ -62,7 +62,13 @@ Polymer({
passwordManagerSubLabel_: { passwordManagerSubLabel_: {
type: String, type: String,
computed: 'computePasswordManagerSubLabel_(compromisedPasswordsCount)', computed: 'computePasswordManagerSubLabel_(compromisedPasswordsCount)',
} },
/** @private */
enablePasswordCheck_: {
type: Boolean,
value: () => loadTimeData.getBoolean('enablePasswordCheck'),
},
}, },
/** /**
...@@ -101,7 +107,7 @@ Polymer({ ...@@ -101,7 +107,7 @@ Polymer({
* @private * @private
*/ */
computePasswordManagerSubLabel_() { computePasswordManagerSubLabel_() {
if (!loadTimeData.getBoolean('enablePasswordCheck')) { if (!this.enablePasswordCheck_) {
return ''; 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