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

Unified Diff: remoting/webapp/host_setup_dialog.js

Issue 299983002: Remove the NPAPI plugin from the webapp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/host_setup_dialog.js
diff --git a/remoting/webapp/host_setup_dialog.js b/remoting/webapp/host_setup_dialog.js
index bf950ba98b37b294d56ed57e50b6def9d67ef825..4697c9008c9ac3e443999477137f332d0150e631 100644
--- a/remoting/webapp/host_setup_dialog.js
+++ b/remoting/webapp/host_setup_dialog.js
@@ -353,15 +353,8 @@ remoting.HostSetupDialog.prototype.installHost_ = function() {
that.updateState_();
};
- /** @param {remoting.HostController.AsyncResult} asyncResult */
- var onDone = function(asyncResult) {
- if (asyncResult == remoting.HostController.AsyncResult.OK) {
- that.hostController_.getLocalHostState(onHostState);
- } else if (asyncResult == remoting.HostController.AsyncResult.CANCELLED) {
- onError(remoting.Error.CANCELLED);
- } else {
- onError(remoting.Error.UNEXPECTED);
- }
+ var onDone = function() {
+ that.hostController_.getLocalHostState(onHostState);
};
/** @param {remoting.HostController.State} state */
@@ -374,23 +367,14 @@ remoting.HostSetupDialog.prototype.installHost_ = function() {
that.flow_.switchToNextStep();
that.updateState_();
} else {
- // For Mac/Linux, prompt the user again if the host is not installed.
- if (navigator.platform != 'Win32') {
- hostInstallDialog.tryAgain();
- } else {
- // For Windows, report an error in the unlikely case that
- // HostController.installHost reports AsyncResult.OK but the host is not
- // installed.
- console.error('The chromoting host is not installed.');
- onError(remoting.Error.UNEXPECTED);
- }
+ // Prompt the user again if the host is not installed.
+ hostInstallDialog.tryAgain();
}
};
/** @type {remoting.HostInstallDialog} */
var hostInstallDialog = new remoting.HostInstallDialog();
- hostInstallDialog.show(
- this.hostController_.getDispatcher().getNpapiHost(), onDone, onError);
+ hostInstallDialog.show(onDone, onError);
}
/**

Powered by Google App Engine
This is Rietveld 408576698