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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add flag showing that shouldOverrideUrl cancelled the navigation Created 5 years, 7 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 8ca36dc7a71cf2fca44cfd47dc25340a0c983a5e..4c202594afaa0cbd178040494945f6aac4a5a689 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2863,7 +2863,8 @@ void RenderFrameImpl::didFailLoad(blink::WebLocalFrame* frame,
Send(new FrameHostMsg_DidFailLoadWithError(routing_id_,
failed_request.url(),
error.reason,
- error_description));
+ error_description,
+ error.wasIgnoredByHandler));
}
void RenderFrameImpl::didFinishLoad(blink::WebLocalFrame* frame) {
@@ -4113,22 +4114,6 @@ void RenderFrameImpl::OnFailedNavigation(
WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
RenderFrame* render_frame,
const NavigationPolicyInfo& info) {
-#ifdef OS_ANDROID
- // The handlenavigation API is deprecated and will be removed once
- // crbug.com/325351 is resolved.
- if (info.urlRequest.url() != GURL(kSwappedOutURL) &&
- GetContentClient()->renderer()->HandleNavigation(
- render_frame,
- static_cast<DocumentState*>(info.extraData),
- render_view_->opener_id_,
- info.frame,
- info.urlRequest,
- info.navigationType,
- info.defaultPolicy,
- info.isRedirect)) {
- return blink::WebNavigationPolicyIgnore;
- }
-#endif
Referrer referrer(RenderViewImpl::GetReferrerFromRequest(info.frame,
info.urlRequest));
@@ -4744,6 +4729,7 @@ void RenderFrameImpl::SendFailedProvisionalLoad(
&params.error_description);
params.url = error.unreachableURL;
params.showing_repost_interstitial = show_repost_interstitial;
+ params.was_ignored_by_handler = error.wasIgnoredByHandler;
Send(new FrameHostMsg_DidFailProvisionalLoadWithError(routing_id_, params));
}

Powered by Google App Engine
This is Rietveld 408576698