summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-03 22:04:36 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-03 22:04:36 +0000
commit6ac8bdc522324383d6518a183f4699e46172f670 (patch)
tree7c85ffd3ed1b2d5c241ae80f3a3bbbe1e5ed98e5 /remoting
parent0957b51b014949ad078ccd5f4a16bd8e655dd88b (diff)
downloadchromium_src-6ac8bdc522324383d6518a183f4699e46172f670.zip
chromium_src-6ac8bdc522324383d6518a183f4699e46172f670.tar.gz
chromium_src-6ac8bdc522324383d6518a183f4699e46172f670.tar.bz2
Clear hosts and last error in refresh, not response.
BUG=None TEST=Change your password and clear the OAuth access token while you have a cached host list. Load the web-app and check that the hosts are not displayed, only the error. Review URL: https://chromiumcodereview.appspot.com/10328003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/host_list.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/remoting/webapp/host_list.js b/remoting/webapp/host_list.js
index c35eeba..a1bb9814 100644
--- a/remoting/webapp/host_list.js
+++ b/remoting/webapp/host_list.js
@@ -104,6 +104,8 @@ remoting.HostList.prototype.refresh = function(onDone) {
onDone(false);
}
};
+ this.hosts_ = [];
+ this.lastError_ = '';
remoting.oauth2.callWithToken(getHosts);
};
@@ -118,8 +120,6 @@ remoting.HostList.prototype.refresh = function(onDone) {
* @private
*/
remoting.HostList.prototype.parseHostListResponse_ = function(xhr, onDone) {
- this.hosts_ = [];
- this.lastError_ = '';
try {
if (xhr.status == 200) {
var response =