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

Unified Diff: third_party/WebKit/Source/modules/fetch/Response.cpp

Issue 2610653002: Tidy up XMLHttpRequest::endLoading(). (Closed)
Patch Set: alpha conversion + use it at two more call sites Created 3 years, 11 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 | « third_party/WebKit/Source/modules/fetch/FetchManager.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/fetch/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 6b4300cd2726bc285c540370352a76da15f8b218..160200bb3041aa2e78fc85515f12a98f8ce3a08e 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -17,6 +17,7 @@
#include "core/dom/DOMArrayBuffer.h"
#include "core/dom/DOMArrayBufferView.h"
#include "core/dom/URLSearchParams.h"
+#include "core/fetch/FetchUtils.h"
#include "core/fileapi/Blob.h"
#include "core/html/FormData.h"
#include "core/streams/ReadableStreamOperations.h"
@@ -376,7 +377,7 @@ unsigned short Response::status() const {
bool Response::ok() const {
// "The ok attribute's getter must return true
// if response's status is in the range 200 to 299, and false otherwise."
- return 200 <= status() && status() <= 299;
+ return FetchUtils::isOkStatus(status());
}
String Response::statusText() const {
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698