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

Unified Diff: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: XSS_AUDITOR. 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
Index: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
index fcccb1c1815d7b6bb6aa767a0ed5ed5776aac958..9590e48c93a62c02d61871303b61e3e59662dab7 100644
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -35,6 +35,7 @@
#include "core/loader/PingLoader.h"
#include "platform/json/JSONValues.h"
#include "platform/network/EncodedFormData.h"
+#include "platform/network/ResourceError.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/text/StringBuilder.h"
@@ -126,8 +127,10 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo) {
PingLoader::XSSAuditorViolationReport);
}
- if (xssInfo.m_didBlockEntirePage)
- m_document->frame()->navigationScheduler().schedulePageBlock(m_document);
+ if (xssInfo.m_didBlockEntirePage) {
+ m_document->frame()->navigationScheduler().schedulePageBlock(
+ m_document, ResourceError::BLOCKED_BY_XSS_AUDITOR);
+ }
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698