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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 1988933003: Revert "Introduce AncestorThrottle, which will process 'X-Frame-Options' headers." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ContentDispositionInline, 47 ContentDispositionInline,
48 ContentDispositionAttachment, 48 ContentDispositionAttachment,
49 ContentDispositionOther 49 ContentDispositionOther
50 } ContentDispositionType; 50 } ContentDispositionType;
51 51
52 enum ContentTypeOptionsDisposition { 52 enum ContentTypeOptionsDisposition {
53 ContentTypeOptionsNone, 53 ContentTypeOptionsNone,
54 ContentTypeOptionsNosniff 54 ContentTypeOptionsNosniff
55 }; 55 };
56 56
57 enum XFrameOptionsDisposition {
58 XFrameOptionsInvalid,
59 XFrameOptionsDeny,
60 XFrameOptionsSameOrigin,
61 XFrameOptionsAllowAll,
62 XFrameOptionsConflict
63 };
64
57 // Be sure to update the behavior of XSSAuditor::combineXSSProtectionHeaderAndCS P whenever you change this enum's content or ordering. 65 // Be sure to update the behavior of XSSAuditor::combineXSSProtectionHeaderAndCS P whenever you change this enum's content or ordering.
58 enum ReflectedXSSDisposition { 66 enum ReflectedXSSDisposition {
59 ReflectedXSSUnset = 0, 67 ReflectedXSSUnset = 0,
60 AllowReflectedXSS, 68 AllowReflectedXSS,
61 ReflectedXSSInvalid, 69 ReflectedXSSInvalid,
62 FilterReflectedXSS, 70 FilterReflectedXSS,
63 BlockReflectedXSS 71 BlockReflectedXSS
64 }; 72 };
65 73
66 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>; 74 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>;
(...skipping 27 matching lines...) Expand all
94 102
95 // Given a Media Type (like "foo/bar; baz=gazonk" - usually from the 103 // Given a Media Type (like "foo/bar; baz=gazonk" - usually from the
96 // 'Content-Type' HTTP header), extract and return the "type/subtype" portion 104 // 'Content-Type' HTTP header), extract and return the "type/subtype" portion
97 // ("foo/bar"). 105 // ("foo/bar").
98 // Note: This function does not in any way check that the "type/subtype" pair 106 // Note: This function does not in any way check that the "type/subtype" pair
99 // is well-formed. 107 // is well-formed.
100 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); 108 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&);
101 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); 109 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&);
102 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0); 110 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0);
103 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL); 111 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL);
112 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ;
104 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader); 113 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader);
105 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&); 114 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&);
106 // Returns true on success, otherwise false. The Suborigin argument must be a 115 // Returns true on success, otherwise false. The Suborigin argument must be a
107 // non-null return argument. |messages| is a list of messages based on any 116 // non-null return argument. |messages| is a list of messages based on any
108 // parse warnings or errors. Even if parseSuboriginHeader returns true, there 117 // parse warnings or errors. Even if parseSuboriginHeader returns true, there
109 // may be Strings in |messages|. 118 // may be Strings in |messages|.
110 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, Suborigin*, WTF: :Vector<String>& messages); 119 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, Suborigin*, WTF: :Vector<String>& messages);
111 120
112 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header); 121 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header);
113 122
114 } // namespace blink 123 } // namespace blink
115 124
116 #endif 125 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/HttpEquiv.h ('k') | third_party/WebKit/Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698