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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 789353004: Host Chrome OS GAIA signin page in webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + switch to messages instead of listener interface Created 5 years, 11 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/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 0b4140441787ac591078d2370f164606779f92a9..59279fe3fcd21512816419db01ba463ec2d42130 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -22,6 +22,7 @@ cr.define('cr.login', function() {
var SIGN_IN_HEADER = 'google-accounts-signin';
var EMBEDDED_FORM_HEADER = 'google-accounts-embedded';
var SAML_HEADER = 'google-accounts-saml';
+ var SERVICE_ID = 'chromeoslogin';
/**
* The source URL parameter for the constrained signin flow.
@@ -113,6 +114,8 @@ cr.define('cr.login', function() {
'message', this.onMessageFromWebview_.bind(this), false);
window.addEventListener(
'popstate', this.onPopState_.bind(this), false);
+
+ this.loaded_ = false;
};
/**
@@ -121,13 +124,14 @@ cr.define('cr.login', function() {
Authenticator.prototype.reload = function() {
this.webview_.src = this.reloadUrl_;
this.authFlow_ = AuthFlow.DEFAULT;
+ this.loaded_ = false;
};
Authenticator.prototype.constructInitialFrameUrl_ = function(data) {
var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH);
url = appendParam(url, 'continue', this.continueUrl_);
- url = appendParam(url, 'service', data.service);
+ url = appendParam(url, 'service', data.service || SERVICE_ID);
if (data.hl)
url = appendParam(url, 'hl', data.hl);
if (data.email)
@@ -270,7 +274,7 @@ cr.define('cr.login', function() {
new CustomEvent('authCompleted',
{detail: {email: this.email_,
gaiaId: this.gaiaId_,
- password: this.password_,
+ password: this.password_ || '',
usingSAML: this.authFlow_ == AuthFlow.SAML,
chooseWhatToSync: this.chooseWhatToSync_,
skipForNow: this.skipForNow_,

Powered by Google App Engine
This is Rietveld 408576698