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

Unified Diff: content/public/browser/navigation_throttle.h

Issue 2321503002: (Re-)introduce AncestorThrottle to handle 'X-Frame-Options'. (Closed)
Patch Set: Rebase after a month... Created 4 years, 2 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/navigation_throttle.h
diff --git a/content/public/browser/navigation_throttle.h b/content/public/browser/navigation_throttle.h
index 4706111c055b9b22260f1cc951b917d28d74a55c..ba49aa73a716aa81af9106d7b875df3f18fa26ac 100644
--- a/content/public/browser/navigation_throttle.h
+++ b/content/public/browser/navigation_throttle.h
@@ -38,6 +38,11 @@ class CONTENT_EXPORT NavigationThrottle {
// error page for net::ERR_BLOCKED_BY_CLIENT being loaded in the frame that
// is navigated.
BLOCK_REQUEST,
+
+ // Blocks a navigation due to rules asserted by a response (for instance,
+ // embedding restrictions like 'X-Frame-Options'). This result will only
+ // be returned from WillProcessResponse.
+ BLOCK_RESPONSE,
};
NavigationThrottle(NavigationHandle* navigation_handle);
@@ -67,7 +72,8 @@ class CONTENT_EXPORT NavigationThrottle {
// throttle is associated with remain alive during the duration of this
// method. Failing to do so will result in use-after-free bugs. Should the
// implementer need to destroy the WebContents, it should return CANCEL,
- // CANCEL_AND_IGNORE and perform the destruction asynchronously.
+ // CANCEL_AND_IGNORE, or BLOCK_RESPONSE and perform the destruction
+ // asynchronously.
virtual ThrottleCheckResult WillProcessResponse();
// The NavigationHandle that is tracking the information related to this
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698