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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2760263002: Reland of PlzNavigate: send SourceLocation when mixed content is found (Closed)
Patch Set: Created 3 years, 9 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 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 c9d8b6964d2c22790443d65d0657728c48c30358..b1dfbf11a00a9b902bc14fb8fdd748b826634f04 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3484,6 +3484,7 @@
info.isClientRedirect = pending_navigation_info_->client_redirect;
info.isCacheDisabled = pending_navigation_info_->cache_disabled;
info.form = pending_navigation_info_->form;
+ info.sourceLocation = pending_navigation_info_->source_location;
pending_navigation_info_.reset(nullptr);
@@ -5753,15 +5754,16 @@
}
void RenderFrameImpl::OnMixedContentFound(
- const GURL& main_resource_url,
- const GURL& mixed_content_url,
- RequestContextType request_context_type,
- bool was_allowed,
- bool had_redirect) {
- auto request_context =
- static_cast<blink::WebURLRequest::RequestContext>(request_context_type);
- frame_->mixedContentFound(main_resource_url, mixed_content_url,
- request_context, was_allowed, had_redirect);
+ const FrameMsg_MixedContentFound_Params& params) {
+ blink::WebSourceLocation source_location;
+ source_location.url = WebString::fromLatin1(params.source_location.url);
+ source_location.lineNumber = params.source_location.line_number;
+ source_location.columnNumber = params.source_location.column_number;
+ auto request_context = static_cast<blink::WebURLRequest::RequestContext>(
+ params.request_context_type);
+ frame_->mixedContentFound(params.main_resource_url, params.mixed_content_url,
+ request_context, params.was_allowed,
+ params.had_redirect, source_location);
}
#if defined(OS_ANDROID)
@@ -6924,4 +6926,16 @@
#endif
}
+RenderFrameImpl::PendingNavigationInfo::PendingNavigationInfo(
+ const NavigationPolicyInfo& info)
+ : navigation_type(info.navigationType),
+ policy(info.defaultPolicy),
+ replaces_current_history_item(info.replacesCurrentHistoryItem),
+ history_navigation_in_new_child_frame(
+ info.isHistoryNavigationInNewChildFrame),
+ client_redirect(info.isClientRedirect),
+ cache_disabled(info.isCacheDisabled),
+ form(info.form),
+ source_location(info.sourceLocation) {}
+
} // namespace content
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698