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

Unified Diff: chrome/browser/resources/chromeos/login/oobe.js

Issue 7511030: Merge 95551 - [ChromeOS] Assorted WebUI login fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/835/src/
Patch Set: Created 9 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
Index: chrome/browser/resources/chromeos/login/oobe.js
===================================================================
--- chrome/browser/resources/chromeos/login/oobe.js (revision 95551)
+++ chrome/browser/resources/chromeos/login/oobe.js (working copy)
@@ -293,7 +293,7 @@
$('cancel-add-user-button').addEventListener('click', function(e) {
this.hidden = true;
$('add-user-button').hidden = false;
- Oobe.showScreen({id: 'account-picker'});
+ Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER});
});
document.addEventListener('keydown', function(e) {
@@ -457,11 +457,12 @@
/**
* Shows sign-in error bubble.
+ * @param {number} loginAttempts Number of login attemps tried.
* @param {string} message Error message to show.
* @param {string} link Text to use for help link.
* @param {number} helpId Help topic Id associated with help link.
*/
- Oobe.showSignInError = function(message, link, helpId) {
+ Oobe.showSignInError = function(loginAttempts, message, link, helpId) {
var currentScreenId = Oobe.getInstance().currentScreen.id;
var anchor = undefined;
if (currentScreenId == SCREEN_SIGNIN) {
@@ -471,6 +472,12 @@
$('signin').reset(true);
} else if (currentScreenId == SCREEN_ACCOUNT_PICKER &&
$('pod-row').activated) {
+ const MAX_LOGIN_ATTEMMPTS_IN_POD = 3;
+ if (loginAttempts > MAX_LOGIN_ATTEMMPTS_IN_POD) {
+ Oobe.showSigninUI($('pod-row').activated.user.emailAddress);
+ return;
+ }
+
anchor = $('pod-row').activated.mainInput;
}
if (!anchor) {
« no previous file with comments | « chrome/browser/resources/chromeos/login/oobe.css ('k') | chrome/browser/resources/chromeos/login/screen_account_picker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698