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

Unified Diff: content/renderer/media/android/media_info_loader.cc

Issue 2230173002: Change WebURLLoaderClient::willFollowRedirect() API to return bool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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: content/renderer/media/android/media_info_loader.cc
diff --git a/content/renderer/media/android/media_info_loader.cc b/content/renderer/media/android/media_info_loader.cc
index 110d11d3a8fcc68dbea31b20ee293d71aa9851d0..5f823f4f7c4c249553bd6962c38dd282491cd543 100644
--- a/content/renderer/media/android/media_info_loader.cc
+++ b/content/renderer/media/android/media_info_loader.cc
@@ -90,17 +90,14 @@ void MediaInfoLoader::Start(blink::WebFrame* frame) {
/////////////////////////////////////////////////////////////////////////////
// blink::WebURLLoaderClient implementation.
-void MediaInfoLoader::willFollowRedirect(WebURLLoader* loader,
+bool MediaInfoLoader::willFollowRedirect(WebURLLoader* loader,
WebURLRequest& newRequest,
const WebURLResponse& redirectResponse,
int64_t encodedDataLength) {
// The load may have been stopped and |ready_cb| is destroyed.
// In this case we shouldn't do anything.
- if (ready_cb_.is_null()) {
- // Set the url in the request to an invalid value (empty url).
- newRequest.setURL(blink::WebURL());
- return;
- }
+ if (ready_cb_.is_null())
+ return false;
// Only allow |single_origin_| if we haven't seen a different origin yet.
if (single_origin_)
@@ -109,6 +106,8 @@ void MediaInfoLoader::willFollowRedirect(WebURLLoader* loader,
url_ = newRequest.url();
first_party_url_ = newRequest.firstPartyForCookies();
allow_stored_credentials_ = newRequest.allowStoredCredentials();
+
+ return true;
}
void MediaInfoLoader::didSendData(

Powered by Google App Engine
This is Rietveld 408576698