Index: chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js |
diff --git a/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js b/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js |
index 04f4917e02a515d5a39c6bc6e5d83178cd1461ea..c455a87ae55e2b10399718b5fa524db3ad7b3187 100644 |
--- a/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js |
+++ b/chrome/browser/resources/settings/people_page/quick_unlock_choose_method.js |
@@ -33,11 +33,15 @@ var QuickUnlockUnlockType = { |
Polymer({ |
is: 'settings-quick-unlock-choose-method', |
- behaviors: [ |
- PrefsBehavior, QuickUnlockPasswordDetectBehavior |
- ], |
+ behaviors: [PrefsBehavior, QuickUnlockPasswordDetectBehavior], |
properties: { |
+ /** @type {!settings.Route} */ |
+ currentRoute: { |
+ type: Object, |
+ observer: 'onRouteChanged_', |
+ }, |
+ |
/** Preferences state. */ |
prefs: { |
type: Object, |
@@ -57,10 +61,7 @@ Polymer({ |
} |
}, |
- observers: [ |
- 'onRouteChanged_(currentRoute)', |
- 'onSetModesChanged_(setModes)' |
- ], |
+ observers: ['onSetModesChanged_(setModes)'], |
/** @override */ |
attached: function() { |
@@ -79,7 +80,7 @@ Polymer({ |
chrome.quickUnlockPrivate.onActiveModesChanged.addListener( |
this.boundOnActiveModesChanged_); |
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD)) |
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD) |
this.askForPasswordIfUnset(); |
}, |
@@ -93,13 +94,13 @@ Polymer({ |
/** @private */ |
onRouteChanged_: function() { |
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD)) |
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD) |
this.askForPasswordIfUnset(); |
}, |
/** @private */ |
onSetModesChanged_: function() { |
- if (this.isScreenActive(QuickUnlockScreen.CHOOSE_METHOD)) |
+ if (this.currentRoute == settings.Route.QUICK_UNLOCK_CHOOSE_METHOD) |
this.askForPasswordIfUnset(); |
}, |