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

Unified Diff: Source/platform/network/HTTPParsers.h

Issue 961773002: Add a comma delimited syntax parser and use it for Accept-CH (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added layout test Created 5 years, 10 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
« no previous file with comments | « Source/core/fetch/Resource.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/HTTPParsers.h
diff --git a/Source/platform/network/HTTPParsers.h b/Source/platform/network/HTTPParsers.h
index cb82132baf423d16f7125c30f02a71afdb6f2c45..833d0829c9ff2d957716582a9364d5aac97e5796 100644
--- a/Source/platform/network/HTTPParsers.h
+++ b/Source/platform/network/HTTPParsers.h
@@ -33,7 +33,9 @@
#include "platform/PlatformExport.h"
#include "wtf/Forward.h"
+#include "wtf/HashSet.h"
#include "wtf/Vector.h"
+#include "wtf/text/StringHash.h"
namespace blink {
@@ -67,6 +69,8 @@ enum ReflectedXSSDisposition {
BlockReflectedXSS
};
+using CommaDelimitedHeaderSet = HashSet<String, CaseFoldingHash>;
+
struct CacheControlHeader {
bool parsed : 1;
bool containsNoCache : 1;
@@ -97,6 +101,7 @@ PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h
PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&);
PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&);
PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicString& cacheControlHeader, const AtomicString& pragmaHeader);
+PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaDelimitedHeaderSet&);
// -1 could be set to one of the return parameters to indicate the value is not specified.
PLATFORM_EXPORT bool parseRange(const String&, long long& rangeOffset, long long& rangeEnd, long long& rangeSuffixLength);
« no previous file with comments | « Source/core/fetch/Resource.cpp ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698