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

Unified Diff: chrome/browser/resources/gaia_auth/main.js

Issue 66403006: Use embedded sign in UI for inline sign in flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add util function for appending param # Created 7 years, 1 month 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 | « no previous file | chrome/browser/resources/gaia_auth/util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gaia_auth/main.js
diff --git a/chrome/browser/resources/gaia_auth/main.js b/chrome/browser/resources/gaia_auth/main.js
index 6b413e6ff0a67eae6b43d29abd4c8c881d21f70e..ced0c3d99a5003e815329d9ba5a485e239ede305 100644
--- a/chrome/browser/resources/gaia_auth/main.js
+++ b/chrome/browser/resources/gaia_auth/main.js
@@ -48,6 +48,7 @@ Authenticator.prototype = {
var params = getUrlSearchParams(location.search);
this.parentPage_ = params.parentPage || this.PARENT_PAGE;
this.gaiaUrl_ = params.gaiaUrl || this.GAIA_URL;
+ this.gaiaPath_ = params.gaiaPath || this.GAIA_PAGE_PATH;
this.inputLang_ = params.hl;
this.inputEmail_ = params.email;
this.service_ = params.service || this.SERVICE_ID;
@@ -77,16 +78,15 @@ Authenticator.prototype = {
},
getFrameUrl_: function() {
- var url = this.gaiaUrl_;
-
- url += this.GAIA_PAGE_PATH +
- '&service=' + encodeURIComponent(this.service_) +
- '&continue=' + encodeURIComponent(this.continueUrl_);
+ var url = this.gaiaUrl_ + this.gaiaPath_;
+ url = appendParam(url, 'service', this.service_);
+ url = appendParam(url, 'continue', this.continueUrl_);
if (this.inputLang_)
- url += '&hl=' + encodeURIComponent(this.inputLang_);
+ url = appendParam(url, 'hl', this.inputLang_);
if (this.inputEmail_)
- url += '&Email=' + encodeURIComponent(this.inputEmail_);
+ url = appendParam(url, 'Email', this.inputEmail_);
+
return url;
},
@@ -101,7 +101,7 @@ Authenticator.prototype = {
window.parent.postMessage(msg, this.parentPage_);
if (gaiaFrame.src.lastIndexOf(
- this.gaiaUrl_ + this.GAIA_PAGE_PATH, 0) == 0) {
+ this.gaiaUrl_ + this.gaiaPath_, 0) == 0) {
gaiaFrame.executeScript({file: 'inline_injected.js'}, function() {
// Send an initial message to gaia so that it has an JavaScript
// reference to the embedder.
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698