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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 2698623006: PlzNavigate: add support for BLOCK_REQUEST during redirects (Closed)
Patch Set: Abandon support of BLOCK_REQUEST on redirect without PlzNavigate. 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/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index e08de5755b08783c751151e708b3c9f74494b4b2..a1b6e73d4acca45a20cb1aa7a0b678bd3e0a695a 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -735,6 +735,14 @@ void NavigationRequest::OnRedirectChecksComplete(
return;
}
+ if (result == NavigationThrottle::BLOCK_REQUEST) {
+ OnRequestFailed(false, net::ERR_BLOCKED_BY_CLIENT);
+
+ // DO NOT ADD CODE after this. The previous call to OnRequestFailed has
+ // destroyed the NavigationRequest.
+ return;
+ }
+
loader_->FollowRedirect();
}
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl_browsertest.cc ('k') | content/public/browser/navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698