OLD | NEW |
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 Loading... |
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 | |
65 // Be sure to update the behavior of XSSAuditor::combineXSSProtectionHeaderAndCS
P whenever you change this enum's content or ordering. | 57 // Be sure to update the behavior of XSSAuditor::combineXSSProtectionHeaderAndCS
P whenever you change this enum's content or ordering. |
66 enum ReflectedXSSDisposition { | 58 enum ReflectedXSSDisposition { |
67 ReflectedXSSUnset = 0, | 59 ReflectedXSSUnset = 0, |
68 AllowReflectedXSS, | 60 AllowReflectedXSS, |
69 ReflectedXSSInvalid, | 61 ReflectedXSSInvalid, |
70 FilterReflectedXSS, | 62 FilterReflectedXSS, |
71 BlockReflectedXSS | 63 BlockReflectedXSS |
72 }; | 64 }; |
73 | 65 |
74 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>; | 66 using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // | 106 // |
115 // Note: | 107 // Note: |
116 // - This function does not in any way check that the "type/subtype" pair | 108 // - This function does not in any way check that the "type/subtype" pair |
117 // is well-formed. | 109 // is well-formed. |
118 // - OWSes at the head and the tail of the region before the first semicolon | 110 // - OWSes at the head and the tail of the region before the first semicolon |
119 // are trimmed. | 111 // are trimmed. |
120 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); | 112 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); |
121 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); | 113 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); |
122 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c
harsetPos, unsigned& charsetLen, unsigned start = 0); | 114 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c
harsetPos, unsigned& charsetLen, unsigned start = 0); |
123 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h
eader, String& failureReason, unsigned& failurePosition, String& reportURL); | 115 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h
eader, String& failureReason, unsigned& failurePosition, String& reportURL); |
124 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&)
; | |
125 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin
g& cacheControlHeader, const AtomicString& pragmaHeader); | 116 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin
g& cacheControlHeader, const AtomicString& pragmaHeader); |
126 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD
elimitedHeaderSet&); | 117 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD
elimitedHeaderSet&); |
127 // Returns true on success, otherwise false. The Suborigin argument must be a | 118 // Returns true on success, otherwise false. The Suborigin argument must be a |
128 // non-null return argument. |messages| is a list of messages based on any | 119 // non-null return argument. |messages| is a list of messages based on any |
129 // parse warnings or errors. Even if parseSuboriginHeader returns true, there | 120 // parse warnings or errors. Even if parseSuboriginHeader returns true, there |
130 // may be Strings in |messages|. | 121 // may be Strings in |messages|. |
131 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, Suborigin*, WTF:
:Vector<String>& messages); | 122 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, Suborigin*, WTF:
:Vector<String>& messages); |
132 | 123 |
133 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons
t String& header); | 124 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons
t String& header); |
134 | 125 |
135 } // namespace blink | 126 } // namespace blink |
136 | 127 |
137 #endif | 128 #endif |
OLD | NEW |