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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.h

Issue 2290983003: CSSStyleSheetResource should cache decoded text instead of raw bytes (Closed)
Patch Set: add dcheck Created 4 years, 2 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
Index: third_party/WebKit/Source/core/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index ca1c89b4940d60bd2c4cabd32ea3808532ed2940..d6c478d0e3ed6799b2f0ead447e626ed2a01bf42 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -201,8 +201,6 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
bool passesAccessControlCheck(SecurityOrigin*,
String& errorDescription) const;
- bool isEligibleForIntegrityCheck(SecurityOrigin*) const;
-
virtual PassRefPtr<const SharedBuffer> resourceBuffer() const {
return m_data;
}
@@ -260,10 +258,21 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
bool isCacheValidator() const { return m_isRevalidating; }
bool hasCacheControlNoStoreHeader() const;
bool hasVaryHeader() const;
- virtual bool mustRefetchDueToIntegrityMetadata(
- const FetchRequest& request) const {
- return false;
+
+ bool isEligibleForIntegrityCheck(SecurityOrigin*) const;
+
+ void setIntegrityMetadata(const IntegrityMetadataSet& metadata) {
+ m_integrityMetadata = metadata;
+ }
+ const IntegrityMetadataSet& integrityMetadata() const {
+ return m_integrityMetadata;
}
+ // The argument must never be |NotChecked|.
+ void setIntegrityDisposition(ResourceIntegrityDisposition);
+ ResourceIntegrityDisposition integrityDisposition() const {
+ return m_integrityDisposition;
+ }
+ bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const;
double currentAge() const;
double freshnessLifetime();
@@ -414,6 +423,9 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
bool m_isRevalidating : 1;
bool m_isAlive : 1;
+ ResourceIntegrityDisposition m_integrityDisposition;
+ IntegrityMetadataSet m_integrityMetadata;
+
// Ordered list of all redirects followed while fetching this resource.
Vector<RedirectPair> m_redirectChain;

Powered by Google App Engine
This is Rietveld 408576698