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

Side by Side Diff: chrome/browser/resources/gaia_auth_host/gaia_auth_host.js

Issue 781623003: Fix Chrome OS enrollment with SAML accounts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit. Rebased. Created 6 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/gaia_auth/main.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview An UI component to host gaia auth extension in an iframe. 6 * @fileoverview An UI component to host gaia auth extension in an iframe.
7 * After the component binds with an iframe, call its {@code load} to start the 7 * After the component binds with an iframe, call its {@code load} to start the
8 * authentication flow. There are two events would be raised after this point: 8 * authentication flow. There are two events would be raised after this point:
9 * a 'ready' event when the authentication UI is ready to use and a 'completed' 9 * a 'ready' event when the authentication UI is ready to use and a 'completed'
10 * event when the authentication is completed successfully. If caller is 10 * event when the authentication is completed successfully. If caller is
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 for (var i in nameList) { 246 for (var i in nameList) {
247 var name = nameList[i]; 247 var name = nameList[i];
248 if (values[name]) 248 if (values[name])
249 params.push(name + '=' + encodeURIComponent(values[name])); 249 params.push(name + '=' + encodeURIComponent(values[name]));
250 } 250 }
251 }; 251 };
252 252
253 populateParams(SUPPORTED_PARAMS, data); 253 populateParams(SUPPORTED_PARAMS, data);
254 populateParams(LOCALIZED_STRING_PARAMS, data.localizedStrings); 254 populateParams(LOCALIZED_STRING_PARAMS, data.localizedStrings);
255 params.push('parentPage=' + encodeURIComponent(window.location.origin)); 255 params.push('parentPage=' + encodeURIComponent(window.location.origin));
256 params.push('needPassword=1');
256 257
257 var url; 258 var url;
258 switch (authMode) { 259 switch (authMode) {
259 case AuthMode.OFFLINE: 260 case AuthMode.OFFLINE:
260 url = OFFLINE_AUTH_URL; 261 url = OFFLINE_AUTH_URL;
261 break; 262 break;
262 case AuthMode.DESKTOP: 263 case AuthMode.DESKTOP:
263 url = AUTH_URL; 264 url = AUTH_URL;
264 params.push('desktopMode=1'); 265 params.push('desktopMode=1');
265 break; 266 break;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 418
418 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; 419 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS;
419 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; 420 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS;
420 GaiaAuthHost.AuthMode = AuthMode; 421 GaiaAuthHost.AuthMode = AuthMode;
421 GaiaAuthHost.AuthFlow = AuthFlow; 422 GaiaAuthHost.AuthFlow = AuthFlow;
422 423
423 return { 424 return {
424 GaiaAuthHost: GaiaAuthHost 425 GaiaAuthHost: GaiaAuthHost
425 }; 426 };
426 }); 427 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698