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

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

Issue 2099243002: PlzNavigate: properly set the initiator of the navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 // requests that have the ignore limits flag set. 2186 // requests that have the ignore limits flag set.
2187 DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS)); 2187 DCHECK(!(load_flags & net::LOAD_IGNORE_LIMITS));
2188 2188
2189 std::unique_ptr<net::URLRequest> new_request; 2189 std::unique_ptr<net::URLRequest> new_request;
2190 new_request = request_context->CreateRequest( 2190 new_request = request_context->CreateRequest(
2191 info.common_params.url, net::HIGHEST, nullptr); 2191 info.common_params.url, net::HIGHEST, nullptr);
2192 2192
2193 new_request->set_method(info.common_params.method); 2193 new_request->set_method(info.common_params.method);
2194 new_request->set_first_party_for_cookies( 2194 new_request->set_first_party_for_cookies(
2195 info.first_party_for_cookies); 2195 info.first_party_for_cookies);
2196 new_request->set_initiator(info.request_initiator); 2196 new_request->set_initiator(info.begin_params.initiator);
2197 if (info.is_main_frame) { 2197 if (info.is_main_frame) {
2198 new_request->set_first_party_url_policy( 2198 new_request->set_first_party_url_policy(
2199 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT); 2199 net::URLRequest::UPDATE_FIRST_PARTY_URL_ON_REDIRECT);
2200 } 2200 }
2201 2201
2202 SetReferrerForRequest(new_request.get(), info.common_params.referrer); 2202 SetReferrerForRequest(new_request.get(), info.common_params.referrer);
2203 2203
2204 net::HttpRequestHeaders headers; 2204 net::HttpRequestHeaders headers;
2205 headers.AddHeadersFromString(info.begin_params.headers); 2205 headers.AddHeadersFromString(info.begin_params.headers);
2206 new_request->SetExtraRequestHeaders(headers); 2206 new_request->SetExtraRequestHeaders(headers);
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id); 2649 ssl.cert_id = GetCertStore()->StoreCert(ssl_info.cert.get(), child_id);
2650 response->head.security_info = SerializeSecurityInfo(ssl); 2650 response->head.security_info = SerializeSecurityInfo(ssl);
2651 } 2651 }
2652 2652
2653 CertStore* ResourceDispatcherHostImpl::GetCertStore() { 2653 CertStore* ResourceDispatcherHostImpl::GetCertStore() {
2654 return cert_store_for_testing_ ? cert_store_for_testing_ 2654 return cert_store_for_testing_ ? cert_store_for_testing_
2655 : CertStore::GetInstance(); 2655 : CertStore::GetInstance();
2656 } 2656 }
2657 2657
2658 } // namespace content 2658 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698