Index: third_party/WebKit/Source/core/loader/PingLoader.cpp |
diff --git a/third_party/WebKit/Source/core/loader/PingLoader.cpp b/third_party/WebKit/Source/core/loader/PingLoader.cpp |
index e8f3a53b7b81df16334372cd7f123d18a1b073a3..fb5ddedb7eee1068d34ccb0a95e8a039579575d8 100644 |
--- a/third_party/WebKit/Source/core/loader/PingLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/PingLoader.cpp |
@@ -213,7 +213,7 @@ private: |
void dispose(); |
// WebURLLoaderClient |
- void willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse&, int64_t encodedDataLength) override; |
+ bool willFollowRedirect(WebURLLoader*, WebURLRequest&, const WebURLResponse&, int64_t encodedDataLength) override; |
void didReceiveResponse(WebURLLoader*, const WebURLResponse&) final; |
void didReceiveData(WebURLLoader*, const char*, int, int, int) final; |
void didFinishLoading(WebURLLoader*, double, int64_t) final; |
@@ -290,16 +290,16 @@ void PingLoaderImpl::dispose() |
m_keepAlive.clear(); |
} |
-void PingLoaderImpl::willFollowRedirect(WebURLLoader*, WebURLRequest& passedNewRequest, const WebURLResponse& passedRedirectResponse, int64_t encodedDataLength) |
+bool PingLoaderImpl::willFollowRedirect(WebURLLoader*, WebURLRequest& passedNewRequest, const WebURLResponse& passedRedirectResponse, int64_t encodedDataLength) |
{ |
if (!m_isBeacon) |
- return; |
+ return true; |
// TODO(tyoshino): Check if setAllowStoredCredentials() should be called |
// also for non beacon cases. |
passedNewRequest.setAllowStoredCredentials(true); |
if (m_corsMode == NotCORSEnabled) |
- return; |
+ return true; |
ResourceRequest& newRequest(passedNewRequest.toMutableResourceRequest()); |
const ResourceResponse& redirectResponse(passedRedirectResponse.toResourceResponse()); |
@@ -318,12 +318,13 @@ void PingLoaderImpl::willFollowRedirect(WebURLLoader*, WebURLRequest& passedNewR |
} |
// Cancel the load and self destruct. |
dispose(); |
- // Signal WebURLLoader that the redirect musn't be followed. |
- passedNewRequest = WebURLRequest(); |
- return; |
+ |
+ return false; |
} |
// FIXME: http://crbug.com/427429 is needed to correctly propagate |
// updates of Origin: following this successful redirect. |
+ |
+ return true; |
} |