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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 1138143002: Pass Device ID in the oauth2/token request. Keep Device ID in local state on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final version. Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 Oobe signin screen implementation. 6 * @fileoverview Oobe signin screen implementation.
7 */ 7 */
8 8
9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
10 // Gaia loading time after which error message must be displayed and 10 // Gaia loading time after which error message must be displayed and
(...skipping 15 matching lines...) Expand all
26 26
27 return { 27 return {
28 EXTERNAL_API: [ 28 EXTERNAL_API: [
29 'loadAuthExtension', 29 'loadAuthExtension',
30 'updateAuthExtension', 30 'updateAuthExtension',
31 'doReload', 31 'doReload',
32 'onWebviewError', 32 'onWebviewError',
33 'onFrameError', 33 'onFrameError',
34 'updateCancelButtonState', 34 'updateCancelButtonState',
35 'showWhitelistCheckFailedError', 35 'showWhitelistCheckFailedError',
36 'updateDeviceId',
37 ], 36 ],
38 37
39 /** 38 /**
40 * Frame loading error code (0 - no error). 39 * Frame loading error code (0 - no error).
41 * @type {number} 40 * @type {number}
42 * @private 41 * @private
43 */ 42 */
44 error_: 0, 43 error_: 0,
45 44
46 /** 45 /**
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (credentials.hasOwnProperty('authCodeOnly') && 747 if (credentials.hasOwnProperty('authCodeOnly') &&
749 credentials.authCodeOnly) { 748 credentials.authCodeOnly) {
750 chrome.send('completeAuthenticationAuthCodeOnly', 749 chrome.send('completeAuthenticationAuthCodeOnly',
751 [credentials.authCode]); 750 [credentials.authCode]);
752 } else { 751 } else {
753 chrome.send('completeAuthentication', [ 752 chrome.send('completeAuthentication', [
754 credentials.gaiaId, 753 credentials.gaiaId,
755 credentials.email, 754 credentials.email,
756 credentials.password, 755 credentials.password,
757 credentials.authCode, 756 credentials.authCode,
758 credentials.usingSAML, 757 credentials.usingSAML
759 credentials.deviceId
760 ]); 758 ]);
761 } 759 }
762 } else { 760 } else {
763 chrome.send('completeLogin', 761 chrome.send('completeLogin',
764 [credentials.gaiaId, 762 [credentials.gaiaId,
765 credentials.email, 763 credentials.email,
766 credentials.password, 764 credentials.password,
767 credentials.usingSAML]); 765 credentials.usingSAML]);
768 } 766 }
769 767
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 $('gaia-whitelist-error').textContent = 952 $('gaia-whitelist-error').textContent =
955 loadTimeData.getValue(isManaged ? 'whitelistErrorEnterprise' : 953 loadTimeData.getValue(isManaged ? 'whitelistErrorEnterprise' :
956 'whitelistErrorConsumer'); 954 'whitelistErrorConsumer');
957 } 955 }
958 956
959 this.classList.toggle('whitelist-error', show); 957 this.classList.toggle('whitelist-error', show);
960 this.loading = !show; 958 this.loading = !show;
961 959
962 if (!show) 960 if (!show)
963 Oobe.showSigninUI(); 961 Oobe.showSigninUI();
964 }, 962 }
965
966 /**
967 * Inform Gaia of new deviceId.
968 * @param {data} Object like {'deviceId': 'test-device-id'}
969 */
970 updateDeviceId: function(data) {
971 if (!this.isNewGaiaFlow)
972 return;
973
974 if (data && data.deviceId)
975 this.gaiaAuthHost_.updateDeviceId(data.deviceId);
976 },
977 }; 963 };
978 }); 964 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698