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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 1280813003: If there are no local credentials for a locked profile, show sign in button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/signin/user_manager_screen_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index a8ab31671f9b8187395807bf7674e0572c29d9e4..6115625876b80feb04eddd91c5c6add47165e425 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -1930,11 +1930,15 @@ cr.define('login', function() {
__proto__: UserPod.prototype,
/** @override */
- get mainInput() {
- if (this.user.needsSignin)
- return this.passwordElement;
- else
- return this.nameElement;
+ initialize: function() {
+ if (this.user.needsSignin) {
+ if (this.user.hasLocalCreds) {
+ this.user.initialAuthType = AUTH_TYPE.OFFLINE_PASSWORD;
+ } else {
+ this.user.initialAuthType = AUTH_TYPE.ONLINE_SIGN_IN;
+ }
+ }
+ UserPod.prototype.initialize.call(this);
},
/** @override */
@@ -1965,18 +1969,10 @@ cr.define('login', function() {
},
/** @override */
- focusInput: function() {
- // Move tabIndex from the whole pod to the main input.
- this.tabIndex = -1;
- this.mainInput.tabIndex = UserPodTabOrder.POD_INPUT;
- this.mainInput.focus();
- },
-
- /** @override */
activate: function(e) {
if (!this.user.needsSignin) {
Oobe.launchUser(this.user.profilePath);
- } else if (!this.passwordElement.value) {
+ } else if (this.user.hasLocalCreds && !this.passwordElement.value) {
return false;
} else {
chrome.send('authenticatedLaunchUser',
@@ -1996,10 +1992,13 @@ cr.define('login', function() {
Oobe.clearErrors();
this.parentNode.lastFocusedPod_ = this;
- // If this is an unlocked pod, then open a browser window. Otherwise
- // just activate the pod and show the password field.
- if (!this.user.needsSignin && !this.isActionBoxMenuActive)
+ // If this is a locked pod and there are local credentials, show the
+ // password field. Otherwise call activate() which will open up a browser
+ // window or show the reauth dialog, as needed.
+ if (!(this.user.needsSignin && this.user.hasLocalCreds) &&
+ !this.isActionBoxMenuActive) {
this.activate(e);
+ }
if (this.isAuthTypeUserClick)
chrome.send('attemptUnlock', [this.user.emailAddress]);
« no previous file with comments | « chrome/browser/ui/webui/signin/user_manager_screen_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698