summaryrefslogtreecommitdiffstats
path: root/remoting/webapp
diff options
context:
space:
mode:
authorsimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-02 00:56:04 +0000
committersimonmorris@chromium.org <simonmorris@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-02 00:56:04 +0000
commite69a42ac3bd9e0b8c71b1e03f07502a7e509ae66 (patch)
tree71411c3afef19656d50d6b27b82d05600443c9b3 /remoting/webapp
parent9640e7b6a96f1b77b7bbc0c17d64e375cda3ca53 (diff)
downloadchromium_src-e69a42ac3bd9e0b8c71b1e03f07502a7e509ae66.zip
chromium_src-e69a42ac3bd9e0b8c71b1e03f07502a7e509ae66.tar.gz
chromium_src-e69a42ac3bd9e0b8c71b1e03f07502a7e509ae66.tar.bz2
[Chromoting] Handle a response status 0 for a list-hosts request more helpfully.
BUG=158786 Review URL: https://codereview.chromium.org/11360053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/webapp')
-rw-r--r--remoting/webapp/host_list.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js
index b0f10d5..1dd6c46 100644
--- a/remoting/webapp/host_list.js
+++ b/remoting/webapp/host_list.js
@@ -164,7 +164,9 @@ remoting.HostList.prototype.parseHostListResponse_ = function(onDone, xhr) {
} else {
// Some other error.
console.error('Bad status on host list query: ', xhr);
- if (xhr.status == 401) {
+ if (xhr.status == 0) {
+ this.lastError_ = remoting.Error.NO_RESPONSE;
+ } else if (xhr.status == 401) {
this.lastError_ = remoting.Error.AUTHENTICATION_FAILED;
} else if (xhr.status == 503) {
this.lastError_ = remoting.Error.SERVICE_UNAVAILABLE;