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

Unified Diff: third_party/WebKit/Source/core/fetch/FetchUtils.h

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
Index: third_party/WebKit/Source/core/fetch/FetchUtils.h
diff --git a/third_party/WebKit/Source/core/fetch/FetchUtils.h b/third_party/WebKit/Source/core/fetch/FetchUtils.h
index 31657670ba0eb14af5982dcd8437dee9718669db..07c272c6597565f9a19d3bba980250413cc420fc 100644
--- a/third_party/WebKit/Source/core/fetch/FetchUtils.h
+++ b/third_party/WebKit/Source/core/fetch/FetchUtils.h
@@ -32,6 +32,11 @@ class CORE_EXPORT FetchUtils {
const HTTPHeaderMap&);
static AtomicString normalizeMethod(const AtomicString& method);
static String normalizeHeaderValue(const String& value);
+
+ // https://fetch.spec.whatwg.org/#ok-status aka a successful 2xx status
+ // code, https://tools.ietf.org/html/rfc7231#section-6.3 . We opt to use
+ // the Fetch term in naming the predicate.
+ static bool isOkStatus(int status) { return status >= 200 && status < 300; }
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698