| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-lock-screen' allows the user to change how they unlock their | 7 * 'settings-lock-screen' allows the user to change how they unlock their |
| 8 * device. | 8 * device. |
| 9 * | 9 * |
| 10 * Example: | 10 * Example: |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 /** | 192 /** |
| 193 * Overridden from settings.RouteObserverBehavior. | 193 * Overridden from settings.RouteObserverBehavior. |
| 194 * @param {!settings.Route} newRoute | 194 * @param {!settings.Route} newRoute |
| 195 * @param {!settings.Route} oldRoute | 195 * @param {!settings.Route} oldRoute |
| 196 * @protected | 196 * @protected |
| 197 */ | 197 */ |
| 198 currentRouteChanged: function(newRoute, oldRoute) { | 198 currentRouteChanged: function(newRoute, oldRoute) { |
| 199 if (newRoute == settings.routes.LOCK_SCREEN && | 199 if (newRoute == settings.routes.LOCK_SCREEN && |
| 200 this.fingerprintUnlockEnabled_ && this.fingerprintBrowserProxy_) { | 200 this.fingerprintUnlockEnabled_ && this.fingerprintBrowserProxy_) { |
| 201 this.fingerprintBrowserProxy_.getNumFingerprints().then( | 201 this.fingerprintBrowserProxy_.getNumFingerprints().then( |
| 202 function(numFingerprints) { | 202 numFingerprints => { |
| 203 this.numFingerprints_ = numFingerprints; | 203 this.numFingerprints_ = numFingerprints; |
| 204 }.bind(this)); | 204 }); |
| 205 } | 205 } |
| 206 | 206 |
| 207 if (this.shouldAskForPassword_(newRoute)) { | 207 if (this.shouldAskForPassword_(newRoute)) { |
| 208 this.openPasswordPromptDialog_(); | 208 this.openPasswordPromptDialog_(); |
| 209 } else if ( | 209 } else if ( |
| 210 newRoute != settings.routes.FINGERPRINT && | 210 newRoute != settings.routes.FINGERPRINT && |
| 211 oldRoute != settings.routes.FINGERPRINT) { | 211 oldRoute != settings.routes.FINGERPRINT) { |
| 212 // If the user navigated away from the lock screen settings page they will | 212 // If the user navigated away from the lock screen settings page they will |
| 213 // have to re-enter their password. An exception is if they are navigating | 213 // have to re-enter their password. An exception is if they are navigating |
| 214 // to or from the fingerprint subpage. | 214 // to or from the fingerprint subpage. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 /** | 362 /** |
| 363 * @param {boolean} easyUnlockEnabled | 363 * @param {boolean} easyUnlockEnabled |
| 364 * @param {boolean} proximityDetectionAllowed | 364 * @param {boolean} proximityDetectionAllowed |
| 365 * @private | 365 * @private |
| 366 */ | 366 */ |
| 367 getShowEasyUnlockToggle_: function( | 367 getShowEasyUnlockToggle_: function( |
| 368 easyUnlockEnabled, proximityDetectionAllowed) { | 368 easyUnlockEnabled, proximityDetectionAllowed) { |
| 369 return easyUnlockEnabled && proximityDetectionAllowed; | 369 return easyUnlockEnabled && proximityDetectionAllowed; |
| 370 }, | 370 }, |
| 371 }); | 371 }); |
| OLD | NEW |