Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: ui/login/account_picker/screen_account_picker.js

Issue 2427073002: cros: Fixed 3 bugs for pin unlock. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 Account picker screen implementation. 6 * @fileoverview Account picker screen implementation.
7 */ 7 */
8 8
9 login.createScreen('AccountPickerScreen', 'account-picker', function() { 9 login.createScreen('AccountPickerScreen', 'account-picker', function() {
10 /** 10 /**
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 * @param {array} users Array of user. 242 * @param {array} users Array of user.
243 * @param {boolean} showGuest Whether to show guest session button. 243 * @param {boolean} showGuest Whether to show guest session button.
244 */ 244 */
245 loadUsers: function(users, showGuest) { 245 loadUsers: function(users, showGuest) {
246 $('pod-row').loadPods(users); 246 $('pod-row').loadPods(users);
247 $('login-header-bar').showGuestButton = showGuest; 247 $('login-header-bar').showGuestButton = showGuest;
248 // On Desktop, #login-header-bar has a shadow if there are 8+ profiles. 248 // On Desktop, #login-header-bar has a shadow if there are 8+ profiles.
249 if (Oobe.getInstance().displayType == DISPLAY_TYPE.DESKTOP_USER_MANAGER) 249 if (Oobe.getInstance().displayType == DISPLAY_TYPE.DESKTOP_USER_MANAGER)
250 $('login-header-bar').classList.toggle('shadow', users.length > 8); 250 $('login-header-bar').classList.toggle('shadow', users.length > 8);
251 251
252 // Disable pin for users which should not be able to access pin. Such
253 // users include those who have not set up pin as those who have not
254 // entered their password recently.
255 for (var i in users) {
jdufault 2016/10/19 18:12:29 Don't we usually do a for (var i = 0; i < users.le
sammiequon 2016/10/19 21:08:10 Done.
256 if (!users[i].showPin)
257 this.disablePinKeyboardForUser(users[i].username);
jdufault 2016/10/19 18:12:29 Why not put this inside of loadPinKeyboardIfNeeded
sammiequon 2016/10/19 21:08:10 Done.
258 }
259
252 this.loadPinKeyboardIfNeeded_(users); 260 this.loadPinKeyboardIfNeeded_(users);
253 }, 261 },
254 262
255 /** 263 /**
256 * Runs app with a given id from the list of loaded apps. 264 * Runs app with a given id from the list of loaded apps.
257 * @param {!string} app_id of an app to run. 265 * @param {!string} app_id of an app to run.
258 * @param {boolean=} opt_diagnostic_mode Whether to run the app in 266 * @param {boolean=} opt_diagnostic_mode Whether to run the app in
259 * diagnostic mode. Default is false. 267 * diagnostic mode. Default is false.
260 */ 268 */
261 runAppForTesting: function(app_id, opt_diagnostic_mode) { 269 runAppForTesting: function(app_id, opt_diagnostic_mode) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 * @param {string} userID The user ID of the public session 429 * @param {string} userID The user ID of the public session
422 * @param {string} locale The locale to which this list of keyboard layouts 430 * @param {string} locale The locale to which this list of keyboard layouts
423 * applies 431 * applies
424 * @param {!Object} list List of available keyboard layouts 432 * @param {!Object} list List of available keyboard layouts
425 */ 433 */
426 setPublicSessionKeyboardLayouts: function(userID, locale, list) { 434 setPublicSessionKeyboardLayouts: function(userID, locale, list) {
427 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); 435 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list);
428 } 436 }
429 }; 437 };
430 }); 438 });
OLDNEW
« no previous file with comments | « no previous file | ui/login/account_picker/user_pod_row.css » ('j') | ui/login/account_picker/user_pod_row.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698