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

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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index d1c5da6018df1df2fa69e92ac0a6002150f6e3ba..92e483a22c2f468d1539ea092b5567d6130cede0 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6125,13 +6125,17 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
GetRequestContextFrameTypeForWebURLRequest(info.urlRequest) ==
REQUEST_CONTEXT_FRAME_TYPE_NESTED);
+ base::Optional<url::Origin> initiator =
nasko 2016/12/16 20:32:42 nit: initiator_origin.
clamy 2016/12/21 14:54:19 Done.
+ 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);
if (!info.form.isNull()) {
WebSearchableFormData web_searchable_form_data(info.form);

Powered by Google App Engine
This is Rietveld 408576698