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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 GetContentClient()->browser()->OverrideCookieStoreForRenderProcess( 1045 GetContentClient()->browser()->OverrideCookieStoreForRenderProcess(
1046 child_id); 1046 child_id);
1047 scoped_ptr<net::URLRequest> new_request; 1047 scoped_ptr<net::URLRequest> new_request;
1048 new_request = request_context->CreateRequest( 1048 new_request = request_context->CreateRequest(
1049 request_data.url, request_data.priority, NULL, cookie_store); 1049 request_data.url, request_data.priority, NULL, cookie_store);
1050 1050
1051 new_request->set_method(request_data.method); 1051 new_request->set_method(request_data.method);
1052 new_request->set_first_party_for_cookies( 1052 new_request->set_first_party_for_cookies(
1053 request_data.first_party_for_cookies); 1053 request_data.first_party_for_cookies);
1054 1054
1055 // If the request is a MAIN_FRAME request, the first-party URL gets updated on
1056 // redirects.
1057 if (request_data.resource_type == ResourceType::MAIN_FRAME) {
1058 new_request->set_first_party_url_policy(
1059 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
1060 }
1061
1055 const Referrer referrer(request_data.referrer, request_data.referrer_policy); 1062 const Referrer referrer(request_data.referrer, request_data.referrer_policy);
1056 SetReferrerForRequest(new_request.get(), referrer); 1063 SetReferrerForRequest(new_request.get(), referrer);
1057 1064
1058 net::HttpRequestHeaders headers; 1065 net::HttpRequestHeaders headers;
1059 headers.AddHeadersFromString(request_data.headers); 1066 headers.AddHeadersFromString(request_data.headers);
1060 new_request->SetExtraRequestHeaders(headers); 1067 new_request->SetExtraRequestHeaders(headers);
1061 1068
1062 new_request->SetLoadFlags(load_flags); 1069 new_request->SetLoadFlags(load_flags);
1063 1070
1064 // Resolve elements from request_body and prepare upload data. 1071 // Resolve elements from request_body and prepare upload data.
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 2003
1997 // Add a flag to selectively bypass the data reduction proxy if the resource 2004 // Add a flag to selectively bypass the data reduction proxy if the resource
1998 // type is not an image. 2005 // type is not an image.
1999 if (request_data.resource_type != ResourceType::IMAGE) 2006 if (request_data.resource_type != ResourceType::IMAGE)
2000 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2007 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2001 2008
2002 return load_flags; 2009 return load_flags;
2003 } 2010 }
2004 2011
2005 } // namespace content 2012 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698