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

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

Issue 2108363002: Fix null deref when hiding the PIN keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 5 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
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 if (app) { 2567 if (app) {
2568 var activationEvent = cr.doc.createEvent('MouseEvents'); 2568 var activationEvent = cr.doc.createEvent('MouseEvents');
2569 var ctrlKey = opt_diagnosticMode; 2569 var ctrlKey = opt_diagnosticMode;
2570 activationEvent.initMouseEvent('click', true, true, null, 2570 activationEvent.initMouseEvent('click', true, true, null,
2571 0, 0, 0, 0, 0, ctrlKey, false, false, false, 0, null); 2571 0, 0, 0, 0, 0, ctrlKey, false, false, false, 0, null);
2572 app.dispatchEvent(activationEvent); 2572 app.dispatchEvent(activationEvent);
2573 } 2573 }
2574 }, 2574 },
2575 2575
2576 /** 2576 /**
2577 * Toggles pod PIN keyboard visiblity.
2578 * @param {!user} username
2579 * @param {boolean} visible
2580 */
2581 setPinVisibility: function(username, visible) {
2582 var pod = this.getPodWithUsername_(username);
2583 if (!pod) {
2584 console.warn('Attempt to change pin visibility to ' + visible +
2585 ' for missing pod ' + JSON.stringify(username) + '.');
xiyuan 2016/06/29 21:53:35 Don't dump user name in log. It is not privacy fri
jdufault 2016/06/29 22:05:32 Done.
2586 return;
2587 }
2588
2589 pod.setPinVisibility(visible);
2590 },
2591
2592 /**
2577 * Removes user pod from pod row. 2593 * Removes user pod from pod row.
2578 * @param {string} email User's email. 2594 * @param {!user} username
2579 */ 2595 */
2580 removeUserPod: function(username) { 2596 removeUserPod: function(username) {
2581 var podToRemove = this.getPodWithUsername_(username); 2597 var podToRemove = this.getPodWithUsername_(username);
2582 if (podToRemove == null) { 2598 if (podToRemove == null) {
2583 console.warn('Attempt to remove not existing pod for ' + username + 2599 console.warn('Attempt to remove not existing pod for ' +
2584 '.'); 2600 JSON.stringify(username) + '.');
xiyuan 2016/06/29 21:53:35 ditto
jdufault 2016/06/29 22:05:32 Done.
2585 return; 2601 return;
2586 } 2602 }
2587 this.removeChild(podToRemove); 2603 this.removeChild(podToRemove);
2588 if (this.pods.length > 0) 2604 if (this.pods.length > 0)
2589 this.placePods_(); 2605 this.placePods_();
2590 }, 2606 },
2591 2607
2592 /** 2608 /**
2593 * Returns index of given pod or -1 if not found. 2609 * Returns index of given pod or -1 if not found.
2594 * @param {UserPod} pod Pod to look up. 2610 * @param {UserPod} pod Pod to look up.
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
3473 if (pod && pod.multiProfilesPolicyApplied) { 3489 if (pod && pod.multiProfilesPolicyApplied) {
3474 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3490 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3475 } 3491 }
3476 } 3492 }
3477 }; 3493 };
3478 3494
3479 return { 3495 return {
3480 PodRow: PodRow 3496 PodRow: PodRow
3481 }; 3497 };
3482 }); 3498 });
OLDNEW
« no previous file with comments | « ui/login/account_picker/screen_account_picker.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698