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

Unified 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: Reviewer comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/client_screen.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/session_connector.js
diff --git a/remoting/webapp/session_connector.js b/remoting/webapp/session_connector.js
index a5facb5e96fcb4295f9ba5262567c686a76c4a5c..5febaab0c2bb206c7a4431a296bc2c2b16758f4a 100644
--- a/remoting/webapp/session_connector.js
+++ b/remoting/webapp/session_connector.js
@@ -194,6 +194,18 @@ remoting.SessionConnector.prototype.connectMe2Me =
};
/**
+ * Update the pairing info so that the reconnect function will work correctly.
+ *
+ * @param {string} clientId The paired client id.
+ * @param {string} sharedSecret The shared secret.
+ */
+remoting.SessionConnector.prototype.updatePairingInfo =
+ function(clientId, sharedSecret) {
+ this.clientPairingId_ = clientId;
+ this.clientPairedSecret_ = sharedSecret;
+};
+
+/**
* Initiate a Me2Me connection.
*
* @param {string} hostId ID of the Me2Me host.
@@ -224,8 +236,6 @@ remoting.SessionConnector.prototype.connectMe2MeInternal_ =
this.cancel();
this.hostId_ = hostId;
- this.clientPairingId_ = clientPairingId;
- this.clientPairedSecret_ = clientPairedSecret;
this.hostJid_ = hostJid;
this.hostPublicKey_ = hostPublicKey;
this.fetchPin_ = fetchPin;
@@ -233,6 +243,7 @@ remoting.SessionConnector.prototype.connectMe2MeInternal_ =
this.hostDisplayName_ = hostDisplayName;
this.connectionMode_ = remoting.ClientSession.Mode.ME2ME;
this.refreshHostJidIfOffline_ = refreshHostJidIfOffline;
+ this.updatePairingInfo(clientPairingId, clientPairedSecret);
this.createSessionIfReady_();
};
« 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