| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 /** | 150 /** |
| 151 * Overridden from settings.RouteObserverBehavior. | 151 * Overridden from settings.RouteObserverBehavior. |
| 152 * @param {!settings.Route} newRoute | 152 * @param {!settings.Route} newRoute |
| 153 * @param {!settings.Route} oldRoute | 153 * @param {!settings.Route} oldRoute |
| 154 * @protected | 154 * @protected |
| 155 */ | 155 */ |
| 156 currentRouteChanged: function(newRoute, oldRoute) { | 156 currentRouteChanged: function(newRoute, oldRoute) { |
| 157 if (newRoute == settings.routes.LOCK_SCREEN && | 157 if (newRoute == settings.routes.LOCK_SCREEN && |
| 158 this.fingerprintUnlockEnabled_ && this.fingerprintBrowserProxy_) { | 158 this.fingerprintUnlockEnabled_ && this.fingerprintBrowserProxy_) { |
| 159 this.fingerprintBrowserProxy_.getNumFingerprints().then( | 159 this.fingerprintBrowserProxy_.getNumFingerprints().then( |
| 160 function(numFingerprints) { | 160 numFingerprints => { |
| 161 this.numFingerprints_ = numFingerprints; | 161 this.numFingerprints_ = numFingerprints; |
| 162 }.bind(this)); | 162 }); |
| 163 } | 163 } |
| 164 | 164 |
| 165 if (this.shouldAskForPassword_(newRoute)) { | 165 if (this.shouldAskForPassword_(newRoute)) { |
| 166 this.openPasswordPromptDialog_(); | 166 this.openPasswordPromptDialog_(); |
| 167 } else if ( | 167 } else if ( |
| 168 newRoute != settings.routes.FINGERPRINT && | 168 newRoute != settings.routes.FINGERPRINT && |
| 169 oldRoute != settings.routes.FINGERPRINT) { | 169 oldRoute != settings.routes.FINGERPRINT) { |
| 170 // If the user navigated away from the lock screen settings page they will | 170 // If the user navigated away from the lock screen settings page they will |
| 171 // have to re-enter their password. An exception is if they are navigating | 171 // have to re-enter their password. An exception is if they are navigating |
| 172 // to or from the fingerprint subpage. | 172 // to or from the fingerprint subpage. |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 /** | 320 /** |
| 321 * @param {boolean} easyUnlockEnabled | 321 * @param {boolean} easyUnlockEnabled |
| 322 * @param {boolean} proximityDetectionAllowed | 322 * @param {boolean} proximityDetectionAllowed |
| 323 * @private | 323 * @private |
| 324 */ | 324 */ |
| 325 getShowEasyUnlockToggle_: function( | 325 getShowEasyUnlockToggle_: function( |
| 326 easyUnlockEnabled, proximityDetectionAllowed) { | 326 easyUnlockEnabled, proximityDetectionAllowed) { |
| 327 return easyUnlockEnabled && proximityDetectionAllowed; | 327 return easyUnlockEnabled && proximityDetectionAllowed; |
| 328 }, | 328 }, |
| 329 }); | 329 }); |
| OLD | NEW |