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

Unified Diff: remoting/webapp/host_controller.js

Issue 396063003: Fix HostDaemonFacade to handle the case when NM host is not installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | remoting/webapp/host_daemon_facade.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/host_controller.js
diff --git a/remoting/webapp/host_controller.js b/remoting/webapp/host_controller.js
index dfcfcf6288f82bf4eb53e0c6f298f6ae59e8e741..34278ac73b44788a03b17a99de7f3ffe3754346b 100644
--- a/remoting/webapp/host_controller.js
+++ b/remoting/webapp/host_controller.js
@@ -431,9 +431,13 @@ remoting.HostController.prototype.updatePin = function(newPin, onDone,
* callback.
*/
remoting.HostController.prototype.getLocalHostState = function(onDone) {
- this.hostDaemonFacade_.getDaemonState(onDone, function(error) {
- onDone(remoting.HostController.State.UNKNOWN);
- });
+ /** @param {remoting.Error} error */
+ function onError(error) {
+ onDone((error == remoting.Error.MISSING_PLUGIN) ?
+ remoting.HostController.State.NOT_INSTALLED :
+ remoting.HostController.State.UNKNOWN);
+ }
+ this.hostDaemonFacade_.getDaemonState(onDone, onError);
};
/**
« no previous file with comments | « no previous file | remoting/webapp/host_daemon_facade.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698