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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 null, | 283 null, |
284 [chrome.quickUnlockPrivate.QuickUnlockMode.PIN], | 284 [chrome.quickUnlockPrivate.QuickUnlockMode.PIN], |
285 [this.pinKeyboardValue_], | 285 [this.pinKeyboardValue_], |
286 onSetModesCompleted.bind(this)); | 286 onSetModesCompleted.bind(this)); |
287 this.writeUma_(LockScreenProgress.CONFIRM_PIN); | 287 this.writeUma_(LockScreenProgress.CONFIRM_PIN); |
288 }, | 288 }, |
289 | 289 |
290 /** | 290 /** |
291 * @private | 291 * @private |
292 * @param {string} problemMessage | 292 * @param {string} problemMessage |
| 293 * @param {string} problemClass |
293 * @return {boolean} | 294 * @return {boolean} |
294 */ | 295 */ |
295 hasProblem_: function(problemMessage) { | 296 hasError_: function(problemMessage, problemClass) { |
296 return !!problemMessage; | 297 return !!problemMessage && problemClass == ProblemType.ERROR; |
297 }, | 298 }, |
298 | 299 |
299 /** | 300 /** |
300 * @private | 301 * @private |
301 * @param {boolean} isConfirmStep | 302 * @param {boolean} isConfirmStep |
302 * @return {string} | 303 * @return {string} |
303 */ | 304 */ |
304 getTitleMessage_: function(isConfirmStep) { | 305 getTitleMessage_: function(isConfirmStep) { |
305 return this.i18n(isConfirmStep ? 'configurePinConfirmPinTitle' : | 306 return this.i18n(isConfirmStep ? 'configurePinConfirmPinTitle' : |
306 'configurePinChoosePinTitle'); | 307 'configurePinChoosePinTitle'); |
307 }, | 308 }, |
308 | 309 |
309 /** | 310 /** |
310 * @private | 311 * @private |
311 * @param {boolean} isConfirmStep | 312 * @param {boolean} isConfirmStep |
312 * @return {string} | 313 * @return {string} |
313 */ | 314 */ |
314 getContinueMessage_: function(isConfirmStep) { | 315 getContinueMessage_: function(isConfirmStep) { |
315 return this.i18n(isConfirmStep ? 'confirm' : 'configurePinContinueButton'); | 316 return this.i18n(isConfirmStep ? 'confirm' : 'configurePinContinueButton'); |
316 }, | 317 }, |
317 }); | 318 }); |
318 | 319 |
319 })(); | 320 })(); |
OLD | NEW |