| Index: chrome/browser/resources/settings/people_page/lock_screen.js
|
| diff --git a/chrome/browser/resources/settings/people_page/lock_screen.js b/chrome/browser/resources/settings/people_page/lock_screen.js
|
| index 419671ac46b7f9b5432e6b1023c0b1cfb932051a..70365d15396bd034b04fa7129ca3d02ffbfd210d 100644
|
| --- a/chrome/browser/resources/settings/people_page/lock_screen.js
|
| +++ b/chrome/browser/resources/settings/people_page/lock_screen.js
|
| @@ -89,8 +89,11 @@
|
|
|
| /** @override */
|
| attached: function() {
|
| - if (this.shouldAskForPassword_(settings.getCurrentRoute()))
|
| - this.$.passwordPrompt.open();
|
| + // currentRouteChanged is not called during the initial navigation. If the
|
| + // user navigates directly to the lockScreen page, we still want to show the
|
| + // password prompt page.
|
| + this.currentRouteChanged(settings.Route.LOCK_SCREEN,
|
| + settings.Route.LOCK_SCREEN);
|
| this.browserProxy_ = settings.FingerprintBrowserProxyImpl.getInstance();
|
| },
|
|
|
| @@ -110,7 +113,7 @@
|
| }.bind(this));
|
| }
|
|
|
| - if (this.shouldAskForPassword_(newRoute)) {
|
| + if (newRoute == settings.Route.LOCK_SCREEN && !this.setModes_) {
|
| this.$.passwordPrompt.open();
|
| } else if (newRoute != settings.Route.FINGERPRINT &&
|
| oldRoute != settings.Route.FINGERPRINT) {
|
| @@ -139,7 +142,8 @@
|
|
|
| /** @private */
|
| onSetModesChanged_: function() {
|
| - if (this.shouldAskForPassword_(settings.getCurrentRoute())) {
|
| + if (settings.getCurrentRoute() == settings.Route.LOCK_SCREEN &&
|
| + !this.setModes_) {
|
| this.$.setupPin.close();
|
| this.$.passwordPrompt.open();
|
| }
|
| @@ -197,13 +201,4 @@
|
| onEditFingerprints_: function() {
|
| settings.navigateTo(settings.Route.FINGERPRINT);
|
| },
|
| -
|
| - /**
|
| - * @param {!settings.Route} route
|
| - * @return {boolean} Whether the password dialog should be shown.
|
| - * @private
|
| - */
|
| - shouldAskForPassword_: function(route) {
|
| - return route == settings.Route.LOCK_SCREEN && !this.setModes_;
|
| - },
|
| });
|
|
|