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..cbd6725eb5ccaf17fd7a085fc4d1d019d8b17953 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,10 +78,10 @@ Authenticator.prototype = { |
}, |
getFrameUrl_: function() { |
- var url = this.gaiaUrl_; |
+ var url = this.gaiaUrl_ + this.gaiaPath_; |
- url += this.GAIA_PAGE_PATH + |
- '&service=' + encodeURIComponent(this.service_) + |
+ url += (url.indexOf('?') == -1) ? '?' : ''; |
+ url += '&service=' + encodeURIComponent(this.service_) + |
xiyuan
2013/11/08 18:19:57
The "&" before service might be not needed for emb
guohui
2013/11/08 18:59:37
Done.
|
'&continue=' + encodeURIComponent(this.continueUrl_); |
if (this.inputLang_) |
@@ -101,7 +102,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. |