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

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

Issue 1110493002: ChromeOS Gaia: UI polishing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed line-height for gaia-body-text Created 5 years, 8 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/offline_gaia.js
diff --git a/chrome/browser/resources/chromeos/login/offline_gaia.js b/chrome/browser/resources/chromeos/login/offline_gaia.js
index bc0ad75eac6aade080e8b31ef0ba05027272d9ec..d072dfe7beff4b84b2b26a9ac5a0962396ff1dd0 100644
--- a/chrome/browser/resources/chromeos/login/offline_gaia.js
+++ b/chrome/browser/resources/chromeos/login/offline_gaia.js
@@ -4,6 +4,8 @@
*/
Polymer('offline-gaia', (function() {
+ var DEFAULT_EMAIL_DOMAIN = '@gmail.com';
+
return {
onTransitionEnd: function() {
this.focus();
@@ -48,7 +50,7 @@ Polymer('offline-gaia', (function() {
if (this.$.passwordInput.checkValidity()) {
var msg = {
'useOffline': true,
- 'email': this.$.emailInput.inputValue,
+ 'email': this.$.passwordHeader.email,
'password': this.$.passwordInput.inputValue
};
this.$.passwordInput.inputValue = '';
@@ -60,6 +62,8 @@ Polymer('offline-gaia', (function() {
setEmail: function(email) {
if (email) {
+ if (this.emailDomain)
+ email = email.replace(this.emailDomain, '');
this.switchToPasswordCard(email);
this.$.passwordInput.setValid(false);
} else {
@@ -82,6 +86,12 @@ Polymer('offline-gaia', (function() {
switchToPasswordCard(email) {
this.$.emailInput.inputValue = email;
+ if (email.indexOf('@') === -1) {
+ if (this.emailDomain)
+ email = email + this.emailDomain;
+ else
+ email = email + DEFAULT_EMAIL_DOMAIN;
+ }
this.$.passwordHeader.email = email;
this.$.backButton.hidden = false;
this.$.animatedPages.selected = 1;

Powered by Google App Engine
This is Rietveld 408576698