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

Unified Diff: content/renderer/render_frame_impl.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: Hrm. 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/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 301ffe66941c73e077f3ca64cab56286663ed0f2..762dbb1d5facb37574a5db467433747a2523eb34 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2169,8 +2169,12 @@ void RenderFrameImpl::LoadNavigationErrorPage(
const WebURLError& error,
bool replace) {
std::string error_html;
- GetContentClient()->renderer()->GetNavigationErrorStrings(
- this, failed_request, error, &error_html, nullptr);
+
+ if (!RenderThreadImpl::current() ||
+ !RenderThreadImpl::current()->layout_test_mode()) {
Mike West 2016/04/25 13:06:21 It's super-strange that we're checking whether we'
+ GetContentClient()->renderer()->GetNavigationErrorStrings(
+ this, failed_request, error, &error_html, nullptr);
+ }
frame_->loadHTMLString(error_html,
GURL(kUnreachableWebDataURL),
@@ -5762,11 +5766,6 @@ bool RenderFrameImpl::ShouldDisplayErrorPageForFailedLoad(
return false;
}
- if (RenderThreadImpl::current() &&
- RenderThreadImpl::current()->layout_test_mode()) {
- return false;
Mike West 2016/04/25 13:06:21 Returning false here for layout tests means that b
- }
-
return true;
}

Powered by Google App Engine
This is Rietveld 408576698