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

Unified Diff: content/browser/loader/navigation_resource_throttle.cc

Issue 1617043002: Introduce AncestorThrottle, which will process 'X-Frame-Options' headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@block-response
Patch Set: Fix. Created 4 years, 8 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/loader/navigation_resource_throttle.cc
diff --git a/content/browser/loader/navigation_resource_throttle.cc b/content/browser/loader/navigation_resource_throttle.cc
index 63210620c9f3fb59a790033b72efd34d153183d6..a6c7900f4065da69d3d9a0444f70869201533be9 100644
--- a/content/browser/loader/navigation_resource_throttle.cc
+++ b/content/browser/loader/navigation_resource_throttle.cc
@@ -237,6 +237,10 @@ void NavigationResourceThrottle::OnUIChecksPerformed(
controller()->CancelAndIgnore();
} else if (result == NavigationThrottle::CANCEL) {
controller()->Cancel();
+ } else if (result == NavigationThrottle::BLOCK_RESPONSE) {
+ // TODO(mkwst): Replace this with something more specific, as the error
+ // page for this code is meant for use with extensions.
+ controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT);
} else {
controller()->Resume();
}

Powered by Google App Engine
This is Rietveld 408576698