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

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

Issue 7793007: [ChromeOS] Pass optional email to auth extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_gaia_signin.js
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index 4fde90e4fe37f9552eb1b799df1405041a06d90f..2d1eac0dc7827f3a5cf0838f14d82a475371c6ac 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -83,13 +83,24 @@ cr.define('login', function() {
onBeforeShow: function(data) {
console.log('Opening extension: ' + data.startUrl +
', opt_email=' + data.email);
+
var frame = $('signin-frame');
frame.addEventListener('load', function(e) {
console.log('Frame loaded: ' + data.startUrl);
});
- frame.contentWindow.location.href = data.startUrl;
- this.extension_url_ = data.startUrl;
- // TODO(xiyuan): Pre-populate Gaia with data.email (if any).
+
+ var params = [];
+ if (data.hl)
+ params.push('hl=' + encodeURIComponent(data.hl));
+ if (data.email)
+ params.push('email=' + encodeURIComponent(data.email));
+
+ var url = data.startUrl;
+ if (params.length)
+ url += '?' + params.join('&');
+
+ frame.contentWindow.location.href = url;
+ this.extension_url_ = url;
$('createAccount').hidden = !data.createAccount;
$('guestSignin').hidden = !data.guestSignin;
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698