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

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.cpp

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
Index: third_party/WebKit/Source/platform/network/HTTPParsers.cpp
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index fbf45a84e48a28f11a0c75cb1f331c7f972c6844..60cf62b284e671cc9a44e12fca4218c4cee3e3cd 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -564,35 +564,6 @@ ContentTypeOptionsDisposition parseContentTypeOptionsHeader(
return ContentTypeOptionsNone;
}
-XFrameOptionsDisposition parseXFrameOptionsHeader(const String& header) {
- XFrameOptionsDisposition result = XFrameOptionsInvalid;
-
- if (header.isEmpty())
- return result;
-
- Vector<String> headers;
- header.split(',', headers);
-
- bool hasValue = false;
- for (size_t i = 0; i < headers.size(); i++) {
- String currentHeader = headers[i].stripWhiteSpace();
- XFrameOptionsDisposition currentValue = XFrameOptionsInvalid;
- if (equalIgnoringCase(currentHeader, "deny"))
- currentValue = XFrameOptionsDeny;
- else if (equalIgnoringCase(currentHeader, "sameorigin"))
- currentValue = XFrameOptionsSameOrigin;
- else if (equalIgnoringCase(currentHeader, "allowall"))
- currentValue = XFrameOptionsAllowAll;
-
- if (!hasValue)
- result = currentValue;
- else if (result != currentValue)
- return XFrameOptionsConflict;
- hasValue = true;
- }
- return result;
-}
-
static bool isCacheHeaderSeparator(UChar c) {
// See RFC 2616, Section 2.2
switch (c) {
« no previous file with comments | « third_party/WebKit/Source/platform/network/HTTPParsers.h ('k') | third_party/WebKit/Source/platform/network/ResourceError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698