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

Unified Diff: remoting/webapp/client_session.js

Issue 15685008: Show a 'remember me' checkbox in the web-app when connecting to a host that supports pairing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/client_screen.js ('k') | remoting/webapp/main.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/client_session.js
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js
index f75bdcf80a12fa168089a19e4ce3c2973be066e3..f40fa850addd071aff82e537e50b808fc90817c3 100644
--- a/remoting/webapp/client_session.js
+++ b/remoting/webapp/client_session.js
@@ -28,8 +28,9 @@ var remoting = remoting || {};
* @param {string} hostPublicKey The base64 encoded version of the host's
* public key.
* @param {string} accessCode The IT2Me access code. Blank for Me2Me.
- * @param {function(function(string): void): void} fetchPin Called by Me2Me
- * connections when a PIN needs to be obtained interactively.
+ * @param {function(boolean, function(string): void): void} fetchPin
+ * Called by Me2Me connections when a PIN needs to be obtained
+ * interactively.
* @param {function(string, string, string,
* function(string, string): void): void}
* fetchThirdPartyToken Called by Me2Me connections when a third party
@@ -745,14 +746,16 @@ remoting.ClientSession.prototype.connectPluginToWcs_ = function() {
remoting.ClientPlugin.Feature.ASYNC_PIN)) {
// Plugin supports asynchronously asking for the PIN.
plugin.useAsyncPinDialog();
- var fetchPin = function() {
- that.fetchPin_(plugin.onPinFetched.bind(plugin));
+ /** @param {boolean} pairingSupported */
+ var fetchPin = function(pairingSupported) {
+ that.fetchPin_(pairingSupported, plugin.onPinFetched.bind(plugin));
};
plugin.fetchPinHandler = fetchPin;
this.connectToHost_('');
} else {
- // Plugin doesn't support asynchronously asking for the PIN, ask now.
- this.fetchPin_(this.connectToHost_.bind(this));
+ // Clients that don't support asking for a PIN asynchronously also don't
+ // support pairing, so request the PIN now without offering to remember it.
+ this.fetchPin_(false, this.connectToHost_.bind(this));
}
};
« no previous file with comments | « remoting/webapp/client_screen.js ('k') | remoting/webapp/main.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698