Build a ResourceRequest with net::RedirectInfo applied in ResourceLoader::WillFollowRedirect()
Currently, the WebURLLoaderImpl builds a WebURLRequest, applies
net::RedirectInfo and passes it to the ResourceLoader and holds the
built WebURLRequest also in it. This back and forth data passing is
confusing and misleading. People often think that data modified on the
WebURLRequest in ResourceLoader are propagated to net/ which is not
true.
The WebURLLoaderImpl::Context also holds the initial WebURLRequest
passed to Start() in |request_|. It's wasteful as the Resource also
holds copies of ResourceRequests for the whole redirect chain including
the initial one.
Bug: 665766
Change-Id: Ie13776f03c5f64ad577e20f7b32c68ceb73f94d2
Reviewed-on: https://chromium-review.googlesource.com/583107
Commit-Queue: Takeshi Yoshino <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Yutaka Hirano <[email protected]>
Cr-Commit-Position: refs/heads/master@{#490075}
diff --git a/content/child/web_url_loader_impl.h b/content/child/web_url_loader_impl.h
index 3678fa8..d82d3a1 100644
--- a/content/child/web_url_loader_impl.h
+++ b/content/child/web_url_loader_impl.h
@@ -57,15 +57,10 @@
mojom::URLLoaderFactory* url_loader_factory);
~WebURLLoaderImpl() override;
- static void PopulateURLResponse(const GURL& url,
+ static void PopulateURLResponse(const blink::WebURL& url,
const ResourceResponseInfo& info,
blink::WebURLResponse* response,
bool report_security_info);
- static blink::WebURLRequest PopulateURLRequestForRedirect(
- const blink::WebURLRequest& request,
- const net::RedirectInfo& redirect_info,
- blink::WebURLRequest::ServiceWorkerMode service_worker_mode);
-
// WebURLLoader methods:
void LoadSynchronously(const blink::WebURLRequest& request,
blink::WebURLResponse& response,