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

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
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..dd49a2911c36b01e8e5a0c7ca2ed44ed8bf5503c 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.hasAnyTag(opt_ignoreErrors)) {
onDone();
return;
}

Powered by Google App Engine
This is Rietveld 408576698