| 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-setup-pin-dialog' is the settings page for choosing a PIN. | 7 * 'settings-setup-pin-dialog' is the settings page for choosing a PIN. |
| 8 * | 8 * |
| 9 * Example: | 9 * Example: |
| 10 * | 10 * |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 this.initialPin_ = ''; | 95 this.initialPin_ = ''; |
| 96 this.pinKeyboardValue_ = ''; | 96 this.pinKeyboardValue_ = ''; |
| 97 this.enableSubmit_ = false; | 97 this.enableSubmit_ = false; |
| 98 this.isConfirmStep_ = false; | 98 this.isConfirmStep_ = false; |
| 99 this.onPinChange_(); | 99 this.onPinChange_(); |
| 100 }, | 100 }, |
| 101 | 101 |
| 102 /** @private */ | 102 /** @private */ |
| 103 onCancelTap_: function() { | 103 onCancelTap_: function() { |
| 104 this.resetState_(); | 104 this.resetState_(); |
| 105 this.$.dialog.cancel(); | 105 this.$.dialog.close(); |
| 106 }, | 106 }, |
| 107 | 107 |
| 108 /** | 108 /** |
| 109 * Returns true if the given PIN is likely easy to guess. | 109 * Returns true if the given PIN is likely easy to guess. |
| 110 * @private | 110 * @private |
| 111 * @param {string} pin | 111 * @param {string} pin |
| 112 * @return {boolean} | 112 * @return {boolean} |
| 113 */ | 113 */ |
| 114 isPinWeak_: function(pin) { | 114 isPinWeak_: function(pin) { |
| 115 // Warn if it's a top-10 pin. | 115 // Warn if it's a top-10 pin. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 * @private | 252 * @private |
| 253 * @param {boolean} isConfirmStep | 253 * @param {boolean} isConfirmStep |
| 254 * @return {string} | 254 * @return {string} |
| 255 */ | 255 */ |
| 256 getContinueMessage_: function(isConfirmStep) { | 256 getContinueMessage_: function(isConfirmStep) { |
| 257 return this.i18n(isConfirmStep ? 'confirm' : 'configurePinContinueButton'); | 257 return this.i18n(isConfirmStep ? 'confirm' : 'configurePinContinueButton'); |
| 258 }, | 258 }, |
| 259 }); | 259 }); |
| 260 | 260 |
| 261 })(); | 261 })(); |
| OLD | NEW |