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

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: Addressed comments 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
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 3d231cf67cd973fec1325ba23bd328c9320e65d3..28a2757ac4e75f82c3d8019f1c6bb2d8ea9862d1 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6186,13 +6186,17 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) ==
REQUEST_CONTEXT_FRAME_TYPE_NESTED);
+ base::Optional<url::Origin> initiator_origin =
+ 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.hasUserGesture(),
info.urlRequest.skipServiceWorker() !=
blink::WebURLRequest::SkipServiceWorker::None,
- GetRequestContextTypeForWebURLRequest(info.urlRequest));
+ GetRequestContextTypeForWebURLRequest(info.urlRequest), initiator_origin);
if (!info.form.isNull()) {
WebSearchableFormData web_searchable_form_data(info.form);
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698