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

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

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: DCHECK. Created 4 years, 7 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 64cf6fd34458cf0d71e8243bf8822014581c2da5..3b7cb5b8c869f4957b1b4adde95d595a4c4b2bcf 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -508,36 +508,6 @@ ContentTypeOptionsDisposition parseContentTypeOptionsHeader(const String& header
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

Powered by Google App Engine
This is Rietveld 408576698