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

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

Issue 2524703002: Introduce Response.redirect attribute and add LayoutTest. (Closed)
Patch Set: Created 4 years 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/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 056f3336fb0b240c790e23f1edb86ed0b4388f41..6b4300cd2726bc285c540370352a76da15f8b218 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -364,6 +364,10 @@ String Response::url() const {
return url;
}
+bool Response::redirected() const {
+ return m_response->urlList().size() > 1;
+}
+
unsigned short Response::status() const {
// "The status attribute's getter must return response's status."
return m_response->status();

Powered by Google App Engine
This is Rietveld 408576698