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 * Contains utilities that help identify the current way that the lock screen | 7 * Contains utilities that help identify the current way that the lock screen |
8 * will be displayed. | 8 * will be displayed. |
9 */ | 9 */ |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 }, | 56 }, |
57 | 57 |
58 /** | 58 /** |
59 * Updates the selected unlock type radio group. This function will get called | 59 * Updates the selected unlock type radio group. This function will get called |
60 * after preferences are initialized, after the quick unlock mode has been | 60 * after preferences are initialized, after the quick unlock mode has been |
61 * changed, and after the lockscreen preference has changed. | 61 * changed, and after the lockscreen preference has changed. |
62 * | 62 * |
63 * @private | 63 * @private |
64 */ | 64 */ |
65 updateUnlockType_: function() { | 65 updateUnlockType_: function() { |
66 this.quickUnlockPrivate_.getActiveModes(function(modes) { | 66 this.quickUnlockPrivate_.getActiveModes(modes => { |
67 if (modes.includes(chrome.quickUnlockPrivate.QuickUnlockMode.PIN)) { | 67 if (modes.includes(chrome.quickUnlockPrivate.QuickUnlockMode.PIN)) { |
68 this.hasPin = true; | 68 this.hasPin = true; |
69 this.selectedUnlockType = LockScreenUnlockType.PIN_PASSWORD; | 69 this.selectedUnlockType = LockScreenUnlockType.PIN_PASSWORD; |
70 } else { | 70 } else { |
71 this.hasPin = false; | 71 this.hasPin = false; |
72 this.selectedUnlockType = LockScreenUnlockType.PASSWORD; | 72 this.selectedUnlockType = LockScreenUnlockType.PASSWORD; |
73 } | 73 } |
74 }.bind(this)); | 74 }); |
75 }, | 75 }, |
76 }; | 76 }; |
OLD | NEW |