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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2745363004: 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 2a4a29a9169c5a72a55094aed549f5644bf99c84..4985916276275d8227f518e3553b18071ab6117c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3475,6 +3475,7 @@ void RenderFrameImpl::didStartProvisionalLoad(blink::WebDataSource* data_source,
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_->location;
pending_navigation_info_.reset(nullptr);
@@ -5731,15 +5732,16 @@ void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) {
}
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)
@@ -6897,4 +6899,16 @@ void RenderFrameImpl::RenderWidgetWillHandleMouseEvent() {
#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),
+ location(info.sourceLocation) {}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698