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

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: Improved PIN dialog layout. 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
Index: remoting/webapp/client_session.js
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js
index f75bdcf80a12fa168089a19e4ce3c2973be066e3..fd79ef4bfb082ad5450ad2df7aea2ab44b1a065a 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(function(string): void, boolean): 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_(plugin.onPinFetched.bind(plugin), pairingSupported);
};
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_(this.connectToHost_.bind(this), false);
}
};

Powered by Google App Engine
This is Rietveld 408576698