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

Side by Side Diff: remoting/webapp/session_connector.js

Issue 22303004: Update pairing information so that reconnect doesn't request a PIN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/client_screen.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 6 * @fileoverview
7 * Connect set-up state machine for Me2Me and IT2Me 7 * Connect set-up state machine for Me2Me and IT2Me
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 remoting.SessionConnector.prototype.connectMe2Me = 187 remoting.SessionConnector.prototype.connectMe2Me =
188 function(host, fetchPin, fetchThirdPartyToken, 188 function(host, fetchPin, fetchThirdPartyToken,
189 clientPairingId, clientPairedSecret) { 189 clientPairingId, clientPairedSecret) {
190 this.connectMe2MeInternal_( 190 this.connectMe2MeInternal_(
191 host.hostId, host.jabberId, host.publicKey, host.hostName, 191 host.hostId, host.jabberId, host.publicKey, host.hostName,
192 fetchPin, fetchThirdPartyToken, 192 fetchPin, fetchThirdPartyToken,
193 clientPairingId, clientPairedSecret, true); 193 clientPairingId, clientPairedSecret, true);
194 }; 194 };
195 195
196 /** 196 /**
197 * Update the pairing info so that the reconnect function will work correctly.
198 *
199 * @param {string} clientId The paired client id.
200 * @param {string} sharedSecret The shared secret.
201 */
202 remoting.SessionConnector.prototype.updatePairingInfo =
203 function(clientId, sharedSecret) {
204 this.clientPairingId_ = clientId;
alexeypa (please no reviews) 2013/08/09 21:35:26 nit: update connectMe2MeInternal_ to call updatePa
Jamie 2013/08/09 21:46:58 Done.
205 this.clientPairedSecret_ = sharedSecret;
206 };
207
208 /**
197 * Initiate a Me2Me connection. 209 * Initiate a Me2Me connection.
198 * 210 *
199 * @param {string} hostId ID of the Me2Me host. 211 * @param {string} hostId ID of the Me2Me host.
200 * @param {string} hostJid XMPP JID of the host. 212 * @param {string} hostJid XMPP JID of the host.
201 * @param {string} hostPublicKey Public Key of the host. 213 * @param {string} hostPublicKey Public Key of the host.
202 * @param {string} hostDisplayName Display name (friendly name) of the host. 214 * @param {string} hostDisplayName Display name (friendly name) of the host.
203 * @param {function(boolean, function(string):void):void} fetchPin Function to 215 * @param {function(boolean, function(string):void):void} fetchPin Function to
204 * interactively obtain the PIN from the user. 216 * interactively obtain the PIN from the user.
205 * @param {function(string, string, string, 217 * @param {function(string, string, string,
206 * function(string, string): void): void} 218 * function(string, string): void): void}
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 * Normalize the access code entered by the user. 555 * Normalize the access code entered by the user.
544 * 556 *
545 * @param {string} accessCode The access code, as entered by the user. 557 * @param {string} accessCode The access code, as entered by the user.
546 * @return {string} The normalized form of the code (whitespace removed). 558 * @return {string} The normalized form of the code (whitespace removed).
547 */ 559 */
548 remoting.SessionConnector.prototype.normalizeAccessCode_ = 560 remoting.SessionConnector.prototype.normalizeAccessCode_ =
549 function(accessCode) { 561 function(accessCode) {
550 // Trim whitespace. 562 // Trim whitespace.
551 return accessCode.replace(/\s/g, ''); 563 return accessCode.replace(/\s/g, '');
552 }; 564 };
OLDNEW
« no previous file with comments | « remoting/webapp/client_screen.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698