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

Unified Diff: Source/platform/network/ResourceResponse.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/network/ResourceRequest.cpp ('k') | Source/platform/network/ResourceResponse.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ResourceResponse.h
diff --git a/Source/platform/network/ResourceResponse.h b/Source/platform/network/ResourceResponse.h
index 93e9fe6578b81119f5f1f5809db9df20b2ba1afa..c6ffd6295d620651941212f5b2a6dc8943b5b8e8 100644
--- a/Source/platform/network/ResourceResponse.h
+++ b/Source/platform/network/ResourceResponse.h
@@ -30,6 +30,7 @@
#include "platform/PlatformExport.h"
#include "platform/blob/BlobData.h"
#include "platform/network/HTTPHeaderMap.h"
+#include "platform/network/HTTPParsers.h"
#include "platform/network/ResourceLoadInfo.h"
#include "platform/network/ResourceLoadTiming.h"
#include "platform/weborigin/KURL.h"
@@ -103,11 +104,11 @@ public:
// These functions return parsed values of the corresponding response headers.
// NaN means that the header was not present or had invalid value.
- bool cacheControlContainsNoCache() const;
- bool cacheControlContainsNoStore() const;
- bool cacheControlContainsMustRevalidate() const;
+ bool cacheControlContainsNoCache();
+ bool cacheControlContainsNoStore();
+ bool cacheControlContainsMustRevalidate();
bool hasCacheValidatorFields() const;
- double cacheControlMaxAge() const;
+ double cacheControlMaxAge();
double date() const;
double age() const;
double expires() const;
@@ -187,7 +188,6 @@ public:
static bool compare(const ResourceResponse&, const ResourceResponse&);
private:
- void parseCacheControlDirectives() const;
void updateHeaderParsedState(const AtomicString& name);
KURL m_url;
@@ -207,17 +207,13 @@ private:
bool m_isNull : 1;
- mutable bool m_haveParsedCacheControlHeader : 1;
+ CacheControlHeader m_cacheControlHeader;
+
mutable bool m_haveParsedAgeHeader : 1;
mutable bool m_haveParsedDateHeader : 1;
mutable bool m_haveParsedExpiresHeader : 1;
mutable bool m_haveParsedLastModifiedHeader : 1;
- mutable bool m_cacheControlContainsNoCache : 1;
- mutable bool m_cacheControlContainsNoStore : 1;
- mutable bool m_cacheControlContainsMustRevalidate : 1;
- mutable double m_cacheControlMaxAge;
-
mutable double m_age;
mutable double m_date;
mutable double m_expires;
« no previous file with comments | « Source/platform/network/ResourceRequest.cpp ('k') | Source/platform/network/ResourceResponse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698