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

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: Rebase Created 4 years, 1 month 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 9dfaccb56b14242e7120ab845a0c505c0ac7e783..75c2df20101dbca0c2a184f4c505208807905686 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6105,6 +6105,10 @@ 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());
Send(new FrameHostMsg_BeginNavigation(
routing_id_, MakeCommonNavigationParams(info),
BeginNavigationParams(
@@ -6113,7 +6117,7 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
info.urlRequest.hasUserGesture(),
info.urlRequest.skipServiceWorker() !=
blink::WebURLRequest::SkipServiceWorker::None,
- GetRequestContextTypeForWebURLRequest(info.urlRequest))));
+ GetRequestContextTypeForWebURLRequest(info.urlRequest), initiator)));
}
void RenderFrameImpl::LoadDataURL(

Powered by Google App Engine
This is Rietveld 408576698