| 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 4f28913744913321a1042ba5a0dc0683db019894..e74ab328963e6a92c1c697658335ac69ac4b7e1f 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
|
| @@ -8,9 +8,7 @@
|
| *
|
| * Example:
|
| *
|
| - * <settings-quick-unlock-setup-pin
|
| - * set-modes="[[quickUnlockSetModes]]"
|
| - * current-route="{{currentRoute}}">
|
| + * <settings-quick-unlock-setup-pin set-modes="[[quickUnlockSetModes]]">
|
| * </settings-quick-unlock-setup-pin>
|
| */
|
|
|
| @@ -51,15 +49,13 @@ var WEAK_PINS = [
|
| Polymer({
|
| is: 'settings-quick-unlock-setup-pin',
|
|
|
| - behaviors: [I18nBehavior, QuickUnlockPasswordDetectBehavior],
|
| + behaviors: [
|
| + I18nBehavior,
|
| + QuickUnlockPasswordDetectBehavior,
|
| + settings.RouteObserverBehavior
|
| + ],
|
|
|
| properties: {
|
| - /** @type {!settings.Route} */
|
| - currentRoute: {
|
| - type: Object,
|
| - observer: 'onRouteChanged_',
|
| - },
|
| -
|
| /**
|
| * The current PIN keyboard value.
|
| * @private
|
| @@ -105,16 +101,13 @@ Polymer({
|
| attached: function() {
|
| this.resetState_();
|
|
|
| - if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| + if (settings.getCurrentRoute() == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| this.askForPasswordIfUnset();
|
| },
|
|
|
| - /**
|
| - * @param {!settings.Route} currentRoute
|
| - * @private
|
| - */
|
| - onRouteChanged_: function(currentRoute) {
|
| - if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN) {
|
| + /** @protected */
|
| + currentRouteChanged: function() {
|
| + if (settings.getCurrentRoute() == settings.Route.QUICK_UNLOCK_SETUP_PIN) {
|
| this.askForPasswordIfUnset();
|
| } else {
|
| // If the user hits the back button, they can leave the element
|
| @@ -125,7 +118,7 @@ Polymer({
|
|
|
| /** @private */
|
| onSetModesChanged_: function() {
|
| - if (this.currentRoute == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| + if (settings.getCurrentRoute() == settings.Route.QUICK_UNLOCK_SETUP_PIN)
|
| this.askForPasswordIfUnset();
|
| },
|
|
|
|
|