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

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

Issue 2321503002: (Re-)introduce AncestorThrottle to handle 'X-Frame-Options'. (Closed)
Patch Set: Rebase after a month... Created 4 years, 1 month 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ContentDispositionInline, 48 ContentDispositionInline,
49 ContentDispositionAttachment, 49 ContentDispositionAttachment,
50 ContentDispositionOther 50 ContentDispositionOther
51 } ContentDispositionType; 51 } ContentDispositionType;
52 52
53 enum ContentTypeOptionsDisposition { 53 enum ContentTypeOptionsDisposition {
54 ContentTypeOptionsNone, 54 ContentTypeOptionsNone,
55 ContentTypeOptionsNosniff 55 ContentTypeOptionsNosniff
56 }; 56 };
57 57
58 enum XFrameOptionsDisposition {
59 XFrameOptionsInvalid,
60 XFrameOptionsDeny,
61 XFrameOptionsSameOrigin,
62 XFrameOptionsAllowAll,
63 XFrameOptionsConflict
64 };
65
66 // Be sure to update the behavior of 58 // Be sure to update the behavior of
67 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's 59 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's
68 // content or ordering. 60 // content or ordering.
69 enum ReflectedXSSDisposition { 61 enum ReflectedXSSDisposition {
70 ReflectedXSSUnset = 0, 62 ReflectedXSSUnset = 0,
71 AllowReflectedXSS, 63 AllowReflectedXSS,
72 ReflectedXSSInvalid, 64 ReflectedXSSInvalid,
73 FilterReflectedXSS, 65 FilterReflectedXSS,
74 BlockReflectedXSS 66 BlockReflectedXSS
75 }; 67 };
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); 117 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&);
126 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, 118 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType,
127 unsigned& charsetPos, 119 unsigned& charsetPos,
128 unsigned& charsetLen, 120 unsigned& charsetLen,
129 unsigned start = 0); 121 unsigned start = 0);
130 PLATFORM_EXPORT ReflectedXSSDisposition 122 PLATFORM_EXPORT ReflectedXSSDisposition
131 parseXSSProtectionHeader(const String& header, 123 parseXSSProtectionHeader(const String& header,
132 String& failureReason, 124 String& failureReason,
133 unsigned& failurePosition, 125 unsigned& failurePosition,
134 String& reportURL); 126 String& reportURL);
135 PLATFORM_EXPORT XFrameOptionsDisposition
136 parseXFrameOptionsHeader(const String&);
137 PLATFORM_EXPORT CacheControlHeader 127 PLATFORM_EXPORT CacheControlHeader
138 parseCacheControlDirectives(const AtomicString& cacheControlHeader, 128 parseCacheControlDirectives(const AtomicString& cacheControlHeader,
139 const AtomicString& pragmaHeader); 129 const AtomicString& pragmaHeader);
140 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, 130 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue,
141 CommaDelimitedHeaderSet&); 131 CommaDelimitedHeaderSet&);
142 // Returns true on success, otherwise false. The Suborigin argument must be a 132 // Returns true on success, otherwise false. The Suborigin argument must be a
143 // non-null return argument. |messages| is a list of messages based on any 133 // non-null return argument. |messages| is a list of messages based on any
144 // parse warnings or errors. Even if parseSuboriginHeader returns true, there 134 // parse warnings or errors. Even if parseSuboriginHeader returns true, there
145 // may be Strings in |messages|. 135 // may be Strings in |messages|.
146 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header, 136 PLATFORM_EXPORT bool parseSuboriginHeader(const String& header,
147 Suborigin*, 137 Suborigin*,
148 WTF::Vector<String>& messages); 138 WTF::Vector<String>& messages);
149 139
150 PLATFORM_EXPORT ContentTypeOptionsDisposition 140 PLATFORM_EXPORT ContentTypeOptionsDisposition
151 parseContentTypeOptionsHeader(const String& header); 141 parseContentTypeOptionsHeader(const String& header);
152 142
153 // Returns true and stores the position of the end of the headers to |*end| 143 // Returns true and stores the position of the end of the headers to |*end|
154 // if the headers part ends in |bytes[0..size]|. Returns false otherwise. 144 // if the headers part ends in |bytes[0..size]|. Returns false otherwise.
155 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes, 145 PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes,
156 size_t, 146 size_t,
157 ResourceResponse*, 147 ResourceResponse*,
158 size_t* end); 148 size_t* end);
159 149
160 } // namespace blink 150 } // namespace blink
161 151
162 #endif 152 #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