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

Unified Diff: content/renderer/pepper/pepper_url_loader_host.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
« no previous file with comments | « content/renderer/pepper/pepper_url_loader_host.h ('k') | media/blink/resource_multibuffer_data_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_url_loader_host.cc
diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc
index e2f5089b391f2c5e814d6b63f8f608c180381c5e..dfc63690f46ba1086e0c81c23395c7942dd1a24e 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -120,7 +120,7 @@ int32_t PepperURLLoaderHost::OnResourceMessageReceived(
return PP_ERROR_FAILED;
}
-void PepperURLLoaderHost::willFollowRedirect(
+bool PepperURLLoaderHost::willFollowRedirect(
WebURLLoader* loader,
WebURLRequest& new_request,
const WebURLResponse& redirect_response) {
@@ -128,7 +128,11 @@ void PepperURLLoaderHost::willFollowRedirect(
if (!request_data_.follow_redirects) {
SaveResponse(redirect_response);
SetDefersLoading(true);
+ // Defer the request and wait the plugin to audit the redirect. We
+ // shouldn't return false here as decision has been delegated to the
+ // plugin.
}
+ return true;
}
void PepperURLLoaderHost::didSendData(
« no previous file with comments | « content/renderer/pepper/pepper_url_loader_host.h ('k') | media/blink/resource_multibuffer_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698