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

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

Issue 955283002: Converted remoting.Error from an enum to a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Requested changes. Created 5 years, 10 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 90d8e555b117d3a3b34430546f79be15d0190efe..2d08c8c627b22ad089f4443a3fda0313f59c62f3 100644
--- a/remoting/webapp/crd/js/xhr.js
+++ b/remoting/webapp/crd/js/xhr.js
@@ -199,16 +199,15 @@ remoting.xhr.startInternal_ = function(
* Generic success/failure response proxy.
*
* @param {function():void} onDone
- * @param {function(remoting.Error):void} onError
+ * @param {function(!remoting.Error):void} onError
* @return {function(XMLHttpRequest):void}
*/
remoting.xhr.defaultResponse = function(onDone, onError) {
/** @param {XMLHttpRequest} xhr */
var result = function(xhr) {
- /** @type {remoting.Error} */
var error =
remoting.Error.fromHttpStatus(/** @type {number} */ (xhr.status));
- if (error == remoting.Error.NONE) {
+ if (error.tag == remoting.Error.Tag.NONE) {
onDone();
} else {
onError(error);

Powered by Google App Engine
This is Rietveld 408576698