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

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

Issue 1004513002: Eliminated named constants for instances of remoting.Error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « remoting/webapp/crd/js/wcs_loader.js ('k') | remoting/webapp/crd/js/xmpp_connection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/xhr.js
diff --git a/remoting/webapp/crd/js/xhr.js b/remoting/webapp/crd/js/xhr.js
index 0551bdca3be439f0e620eddae9d9a05144d6f200..0529838ddfa88730b521a4e5d457d3546d98ca5c 100644
--- a/remoting/webapp/crd/js/xhr.js
+++ b/remoting/webapp/crd/js/xhr.js
@@ -208,12 +208,12 @@ remoting.xhr.defaultResponse = function(onDone, onError, opt_ignoreErrors) {
var result = function(xhr) {
var error =
remoting.Error.fromHttpStatus(/** @type {number} */ (xhr.status));
- if (!error.isError()) {
+ if (error.isNone()) {
onDone();
return;
}
- if (opt_ignoreErrors && opt_ignoreErrors.indexOf(error.tag) !== -1) {
+ if (opt_ignoreErrors && error.hasTag.apply(error, opt_ignoreErrors)) {
onDone();
return;
}
« no previous file with comments | « remoting/webapp/crd/js/wcs_loader.js ('k') | remoting/webapp/crd/js/xmpp_connection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698