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

Unified Diff: content/child/resource_dispatcher.cc

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a TODO Created 6 years, 5 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/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 922681bbbf841dab5c70e8745ddfd8da37885813..8e68cd042111a3a696a5e044af5e48f31dfe5b1b 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -491,8 +491,7 @@ void ResourceDispatcher::OnDownloadedData(int request_id,
void ResourceDispatcher::OnReceivedRedirect(
int request_id,
- const GURL& new_url,
- const GURL& new_first_party_for_cookies,
+ const net::RedirectInfo& redirect_info,
const ResourceResponseHead& response_head) {
TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedRedirect");
PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
@@ -502,8 +501,8 @@ void ResourceDispatcher::OnReceivedRedirect(
ResourceResponseInfo renderer_response_info;
ToResourceResponseInfo(*request_info, response_head, &renderer_response_info);
- if (request_info->peer->OnReceivedRedirect(
- new_url, new_first_party_for_cookies, renderer_response_info)) {
+ if (request_info->peer->OnReceivedRedirect(redirect_info,
+ renderer_response_info)) {
// Double-check if the request is still around. The call above could
// potentially remove it.
request_info = GetPendingRequestInfo(request_id);
@@ -511,7 +510,7 @@ void ResourceDispatcher::OnReceivedRedirect(
return;
// We update the response_url here so that we can send it to
// SiteIsolationPolicy later when OnReceivedResponse is called.
- request_info->response_url = new_url;
+ request_info->response_url = redirect_info.url;
request_info->pending_redirect_message.reset(
new ResourceHostMsg_FollowRedirect(request_id));
if (!request_info->is_deferred) {

Powered by Google App Engine
This is Rietveld 408576698