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

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

Issue 848943003: Fix typo in js code when checking the origin of a message coming from the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 11 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
« no previous file with comments | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 authenciate to Chrome. The component hosts 6 * @fileoverview An UI component to authenciate to Chrome. The component hosts
7 * IdP web pages in a webview. A client who is interested in monitoring 7 * IdP web pages in a webview. A client who is interested in monitoring
8 * authentication events should pass a listener object of type 8 * authentication events should pass a listener object of type
9 * cr.login.GaiaAuthHost.Listener as defined in this file. After initialization, 9 * cr.login.GaiaAuthHost.Listener as defined in this file. After initialization,
10 * call {@code load} to start the authentication flow. 10 * call {@code load} to start the authentication flow.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 }; 242 };
243 243
244 /** 244 /**
245 * Invoked when an HTML5 message is received from the webview element. 245 * Invoked when an HTML5 message is received from the webview element.
246 * @param {object} e Payload of the received HTML5 message. 246 * @param {object} e Payload of the received HTML5 message.
247 * @private 247 * @private
248 */ 248 */
249 Authenticator.prototype.onMessageFromWebview_ = function(e) { 249 Authenticator.prototype.onMessageFromWebview_ = function(e) {
250 // The event origin does not have a trailing slash. 250 // The event origin does not have a trailing slash.
251 if (e.origin != this.idpOrigin_.substring(0, this.idpOrigin_ - 1)) { 251 if (e.origin != this.idpOrigin_.substring(0, this.idpOrigin_.length - 1)) {
252 return; 252 return;
253 } 253 }
254 254
255 var msg = e.data; 255 var msg = e.data;
256 if (msg.method == 'attemptLogin') { 256 if (msg.method == 'attemptLogin') {
257 this.email_ = msg.email; 257 this.email_ = msg.email;
258 this.password_ = msg.password; 258 this.password_ = msg.password;
259 this.chooseWhatToSync_ = msg.chooseWhatToSync; 259 this.chooseWhatToSync_ = msg.chooseWhatToSync;
260 } 260 }
261 }; 261 };
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 Authenticator.AuthFlow = AuthFlow; 305 Authenticator.AuthFlow = AuthFlow;
306 Authenticator.AuthMode = AuthMode; 306 Authenticator.AuthMode = AuthMode;
307 307
308 return { 308 return {
309 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old 309 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old
310 // iframe-based flow is deprecated. 310 // iframe-based flow is deprecated.
311 GaiaAuthHost: Authenticator 311 GaiaAuthHost: Authenticator
312 }; 312 };
313 }); 313 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698