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

Unified Diff: content/renderer/render_frame_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: Fixed issue in SW preload Created 4 years 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/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a50204fa953cf6a5cd996c1b04281d4d172c7062..1fe0864082a51056679fc0a3990f7e62e6363a36 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6143,12 +6143,16 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) ==
REQUEST_CONTEXT_FRAME_TYPE_NESTED);
+ base::Optional<url::Origin> initiator =
+ info.urlRequest.requestorOrigin().isNull()
+ ? base::Optional<url::Origin>()
+ : base::Optional<url::Origin>(info.urlRequest.requestorOrigin());
BeginNavigationParams begin_navigation_params(
GetWebURLRequestHeaders(info.urlRequest),
GetLoadFlagsForWebURLRequest(info.urlRequest),
info.urlRequest.skipServiceWorker() !=
blink::WebURLRequest::SkipServiceWorker::None,
- GetRequestContextTypeForWebURLRequest(info.urlRequest));
+ GetRequestContextTypeForWebURLRequest(info.urlRequest), initiator);
if (!info.form.isNull()) {
WebSearchableFormData web_searchable_form_data(info.form);

Powered by Google App Engine
This is Rietveld 408576698