| Index: chrome/browser/resources/settings/people_page/quick_unlock_setup_pin.js
|
| diff --git a/chrome/browser/resources/settings/people_page/quick_unlock_setup_pin.js b/chrome/browser/resources/settings/people_page/quick_unlock_setup_pin.js
|
| index 0222094a08d4881844881c8f53dca55aae9a6e7b..4f28913744913321a1042ba5a0dc0683db019894 100644
|
| --- a/chrome/browser/resources/settings/people_page/quick_unlock_setup_pin.js
|
| +++ b/chrome/browser/resources/settings/people_page/quick_unlock_setup_pin.js
|
| @@ -51,12 +51,15 @@ var WEAK_PINS = [
|
| Polymer({
|
| is: 'settings-quick-unlock-setup-pin',
|
|
|
| - behaviors: [
|
| - QuickUnlockPasswordDetectBehavior,
|
| - I18nBehavior
|
| - ],
|
| + behaviors: [I18nBehavior, QuickUnlockPasswordDetectBehavior],
|
|
|
| properties: {
|
| + /** @type {!settings.Route} */
|
| + currentRoute: {
|
| + type: Object,
|
| + observer: 'onRouteChanged_',
|
| + },
|
| +
|
| /**
|
| * The current PIN keyboard value.
|
| * @private
|
| @@ -96,16 +99,13 @@ Polymer({
|
| },
|
| },
|
|
|
| - observers: [
|
| - 'onRouteChanged_(currentRoute)',
|
| - 'onSetModesChanged_(setModes)'
|
| - ],
|
| + observers: ['onSetModesChanged_(setModes)'],
|
|
|
| /** @override */
|
| attached: function() {
|
| this.resetState_();
|
|
|
| - if (this.isScreenActive(QuickUnlockScreen.SETUP_PIN))
|
| + if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| this.askForPasswordIfUnset();
|
| },
|
|
|
| @@ -114,7 +114,7 @@ Polymer({
|
| * @private
|
| */
|
| onRouteChanged_: function(currentRoute) {
|
| - if (this.isScreenActive(QuickUnlockScreen.SETUP_PIN)) {
|
| + if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN) {
|
| this.askForPasswordIfUnset();
|
| } else {
|
| // If the user hits the back button, they can leave the element
|
| @@ -125,7 +125,7 @@ Polymer({
|
|
|
| /** @private */
|
| onSetModesChanged_: function() {
|
| - if (this.isScreenActive(QuickUnlockScreen.SETUP_PIN))
|
| + if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| this.askForPasswordIfUnset();
|
| },
|
|
|
|
|