| 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 * | 7 * |
| 8 * 'settings-password-prompt-dialog' shows a dialog which asks for the user to | 8 * 'settings-password-prompt-dialog' shows a dialog which asks for the user to |
| 9 * enter their password. It validates the password is correct. Once the user has | 9 * enter their password. It validates the password is correct. Once the user has |
| 10 * entered their account password, the page fires an 'authenticated' event and | 10 * entered their account password, the page fires an 'authenticated' event and |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 chrome.quickUnlockPrivate.getActiveModes(function(modes) { | 40 chrome.quickUnlockPrivate.getActiveModes(function(modes) { |
| 41 var credentials = | 41 var credentials = |
| 42 /** @type {!Array<string>} */ (Array(modes.length).fill('')); | 42 /** @type {!Array<string>} */ (Array(modes.length).fill('')); |
| 43 chrome.quickUnlockPrivate.setModes(password, modes, credentials, onCheck); | 43 chrome.quickUnlockPrivate.setModes(password, modes, credentials, onCheck); |
| 44 }); | 44 }); |
| 45 } | 45 } |
| 46 | 46 |
| 47 Polymer({ | 47 Polymer({ |
| 48 is: 'settings-password-prompt-dialog', | 48 is: 'settings-password-prompt-dialog', |
| 49 | 49 |
| 50 /**TODO(xiaoyinh@): Remove I18nBehavior once we don't support options. */ |
| 51 behaviors: [ |
| 52 I18nBehavior, |
| 53 ], |
| 54 |
| 50 properties: { | 55 properties: { |
| 51 /** | 56 /** |
| 52 * A wrapper around chrome.quickUnlockPrivate.setModes with the account | 57 * A wrapper around chrome.quickUnlockPrivate.setModes with the account |
| 53 * password already supplied. If this is null, the authentication screen | 58 * password already supplied. If this is null, the authentication screen |
| 54 * needs to be redisplayed. This property will be cleared after | 59 * needs to be redisplayed. This property will be cleared after |
| 55 * PASSWORD_ACTIVE_DURATION_MS milliseconds. | 60 * PASSWORD_ACTIVE_DURATION_MS milliseconds. |
| 56 */ | 61 */ |
| 57 setModes: { | 62 setModes: { |
| 58 type: Object, | 63 type: Object, |
| 59 notify: true | 64 notify: true |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 this.passwordInvalid_ = false; | 167 this.passwordInvalid_ = false; |
| 163 }, | 168 }, |
| 164 | 169 |
| 165 /** @private */ | 170 /** @private */ |
| 166 enableConfirm_: function() { | 171 enableConfirm_: function() { |
| 167 return !!this.password_ && !this.passwordInvalid_; | 172 return !!this.password_ && !this.passwordInvalid_; |
| 168 } | 173 } |
| 169 }); | 174 }); |
| 170 | 175 |
| 171 })(); | 176 })(); |
| OLD | NEW |