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

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

Issue 232993004: Reland "Allow cache reuse of some requests with Cache-Control headers" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/platform/blink_platform.gypi ('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 e6095e28c7509c751dd909c32b18205dc1654d3a..7bd7ed387ba58ae3d3a953c57640b76659d1a8d2 100644
--- a/Source/platform/network/HTTPParsers.h
+++ b/Source/platform/network/HTTPParsers.h
@@ -70,6 +70,23 @@ enum ReflectedXSSDisposition {
BlockReflectedXSS
};
+struct CacheControlHeader {
+ bool parsed : 1;
+ bool containsNoCache : 1;
+ bool containsNoStore : 1;
+ bool containsMustRevalidate : 1;
+ double maxAge;
+
+ CacheControlHeader()
+ : parsed(false)
+ , containsNoCache(false)
+ , containsNoStore(false)
+ , containsMustRevalidate(false)
+ , maxAge(0.0)
+ {
+ }
+};
+
PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&);
PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&);
PLATFORM_EXPORT bool isValidHTTPToken(const String&);
@@ -82,6 +99,7 @@ PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c
PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& header, String& failureReason, unsigned& failurePosition, String& reportURL);
PLATFORM_EXPORT String extractReasonPhraseFromHTTPStatusLine(const String&);
PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&);
+PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicString& cacheControlHeader, const AtomicString& pragmaHeader);
// -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/platform/blink_platform.gypi ('k') | Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698