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

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, 2 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 3d1d08427bca7aeb7a5c987a0a9340bdbf7eac76..b77536c64c04e4ffd40cf3931cd72e8699b802d7 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(
+bool MediaInfoLoader::willFollowRedirect(
WebURLLoader* loader,
WebURLRequest& newRequest,
const WebURLResponse& redirectResponse) {
// 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(
url_ = newRequest.url();
first_party_url_ = newRequest.firstPartyForCookies();
allow_stored_credentials_ = newRequest.allowStoredCredentials();
+
+ return true;
}
void MediaInfoLoader::didSendData(
« no previous file with comments | « content/renderer/media/android/media_info_loader.h ('k') | content/renderer/pepper/pepper_url_loader_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698