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

Unified Diff: remoting/webapp/crd/js/me2me_activity.js

Issue 1765643003: Load host settings in connect_ to ensure they are valid for every connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/me2me_activity.js
diff --git a/remoting/webapp/crd/js/me2me_activity.js b/remoting/webapp/crd/js/me2me_activity.js
index 66530a0c80e64482e8225db229d1e53458b115b1..863556562d0d45cade2c88a39e4cfa680483a1d3 100644
--- a/remoting/webapp/crd/js/me2me_activity.js
+++ b/remoting/webapp/crd/js/me2me_activity.js
@@ -74,11 +74,10 @@ remoting.Me2MeActivity.prototype.start = function() {
}
}
- this.hostUpdateDialog_.showIfNecessary(webappVersion).then(function() {
- return that.host_.options.load();
- }).catch(remoting.Error.handler(function(/** remoting.Error */ error) {
- // User cancels out of the Host upgrade dialog. Report it as bad version.
- throw new remoting.Error(remoting.Error.Tag.BAD_VERSION);
+ this.hostUpdateDialog_.showIfNecessary(webappVersion).catch(
+ remoting.Error.handler(function(/** remoting.Error */ error) {
+ // User cancels the Host upgrade dialog. Report it as bad version.
+ throw new remoting.Error(remoting.Error.Tag.BAD_VERSION);
})).then(
this.gnubbyAuthHandler_.isGnubbyExtensionInstalled.bind(
this.gnubbyAuthHandler_)
@@ -144,7 +143,11 @@ remoting.Me2MeActivity.prototype.connect_ = function() {
this.desktopActivity_ = new remoting.DesktopRemotingActivity(
this, this.logger_, this.additionalCapabilities_);
this.desktopActivity_.getConnectingDialog().show();
- this.desktopActivity_.start(this.host_, this.createCredentialsProvider_());
+ this.host_.options.load().then(
+ function() {
+ this.desktopActivity_.start(this.host_,
+ this.createCredentialsProvider_());
+ }.bind(this));
};
/**
« 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