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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 2053593002: WIP: URLRequest-based UIR implementation. Base URL: https://chromium.googlesource.com/chromium/src.git@replicate
Patch Set: Created 4 years, 6 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
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 <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS)); 2231 DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS));
2232 2232
2233 std::unique_ptr<net::URLRequest> new_request; 2233 std::unique_ptr<net::URLRequest> new_request;
2234 new_request = request_context->CreateRequest( 2234 new_request = request_context->CreateRequest(
2235 info.common_params.url, net::HIGHEST, nullptr); 2235 info.common_params.url, net::HIGHEST, nullptr);
2236 2236
2237 new_request->set_method(info.common_params.method); 2237 new_request->set_method(info.common_params.method);
2238 new_request->set_first_party_for_cookies( 2238 new_request->set_first_party_for_cookies(
2239 info.first_party_for_cookies); 2239 info.first_party_for_cookies);
2240 new_request->set_initiator(info.request_initiator); 2240 new_request->set_initiator(info.request_initiator);
2241 if (info.should_upgrade_to_secure_transport) {
2242 new_request->set_insecure_request_policy(net::URLRequest::UPGRADE_SAME_HOST_ INSECURE_REQUESTS);
2243 }
2241 if (info.is_main_frame) { 2244 if (info.is_main_frame) {
2242 new_request->set_first_party_url_policy( 2245 new_request->set_first_party_url_policy(
2243 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); 2246 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
2244 } 2247 }
2245 2248
2246 SetReferrerForRequest(new_request.get(), info.common_params.referrer); 2249 SetReferrerForRequest(new_request.get(), info.common_params.referrer);
2247 2250
2248 net::HttpRequestHeaders headers; 2251 net::HttpRequestHeaders headers;
2249 headers.AddHeadersFromString(info.begin_params.headers); 2252 headers.AddHeadersFromString(info.begin_params.headers);
2250 new_request->SetExtraRequestHeaders(headers); 2253 new_request->SetExtraRequestHeaders(headers);
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2696 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2694 response->head.security_info = SerializeSecurityInfo(ssl); 2697 response->head.security_info = SerializeSecurityInfo(ssl);
2695 } 2698 }
2696 2699
2697 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2700 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2698 return cert_store_for_testing_ ? cert_store_for_testing_ 2701 return cert_store_for_testing_ ? cert_store_for_testing_
2699 : CertStore::GetInstance(); 2702 : CertStore::GetInstance();
2700 } 2703 }
2701 2704
2702 } // namespace content 2705 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698