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

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

Issue 803653004: Update Chromoting to use /third_party/closure_compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/crd/js/it2me_helpee_channel.js
diff --git a/remoting/webapp/crd/js/it2me_helpee_channel.js b/remoting/webapp/crd/js/it2me_helpee_channel.js
index bcce9bd4535a1db586701999fba3a2c65a266d8f..44423d28671293678b7e1a634be0f4702125d56a 100644
--- a/remoting/webapp/crd/js/it2me_helpee_channel.js
+++ b/remoting/webapp/crd/js/it2me_helpee_channel.js
@@ -188,8 +188,8 @@ remoting.It2MeHelpeeChannel.prototype.onHangoutMessage_ = function(message) {
return true;
}
throw new Error('Unsupported message method=' + message.method);
- } catch(e) {
- var error = /** @type {Error} */ e;
+ } catch(/** @type {*} */ e) {
+ var error = /** @type {Error} */ (e);
this.sendErrorResponse_(message, error.message);
}
return false;
@@ -217,7 +217,7 @@ remoting.It2MeHelpeeChannel.prototype.handleIsHostInstalled_ =
this.hostInstaller_.isInstalled().then(
sendResponse,
- this.sendErrorResponse_.bind(this, message)
+ /** @type {function(*):void} */(this.sendErrorResponse_.bind(this, message))
);
};
@@ -228,8 +228,8 @@ remoting.It2MeHelpeeChannel.prototype.handleIsHostInstalled_ =
remoting.It2MeHelpeeChannel.prototype.handleDownloadHost_ = function(message) {
try {
this.hostInstaller_.download();
- } catch (e) {
- var error = /** @type {Error} */ e;
+ } catch (/** @type {*} */ e) {
+ var error = /** @type {Error} */ (e);
this.sendErrorResponse_(message, error.message);
}
};
@@ -265,8 +265,8 @@ remoting.It2MeHelpeeChannel.prototype.handleConnect_ =
).then(
this.fetchOAuthToken_.bind(this)
).then(
- this.connectToHost_.bind(this, email),
- this.sendErrorResponse_.bind(this, message)
+ /** @type {function(*):void} */(this.connectToHost_.bind(this, email)),
+ /** @type {function(*):void} */(this.sendErrorResponse_.bind(this, message))
);
};
@@ -335,7 +335,7 @@ remoting.It2MeHelpeeChannel.prototype.showConfirmDialogV2_ = function() {
/** @param {number} result */
function confirmDialogCallback(result) {
if (result === 1) {
- resolve();
+ resolve(true);
} else {
reject(new Error(remoting.Error.CANCELLED));
}
@@ -366,9 +366,10 @@ remoting.It2MeHelpeeChannel.prototype.initializeHost_ = function() {
*/
return new Promise(function(resolve, reject) {
if (host.initialized()) {
- resolve();
+ resolve(true);
} else {
- host.initialize(resolve, reject);
+ host.initialize(/** @type {function(*=):void} */ (resolve),
+ /** @type {function(*=):void} */ (reject));
}
});
};

Powered by Google App Engine
This is Rietveld 408576698