Get rid of "CachePolicyCache" cache policy
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 23:26:08 +0000 (23:26 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 23:26:08 +0000 (23:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142881

Reviewed by Antti Koivisto.

Get rid of "CachePolicyCache" cache policy as it is unused.

* loader/cache/CachePolicy.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
* page/DiagnosticLoggingKeys.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181766 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachePolicy.h
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/page/DiagnosticLoggingKeys.cpp
Source/WebCore/page/DiagnosticLoggingKeys.h

index 4980208..3ef8dbe 100644 (file)
@@ -1,3 +1,19 @@
+2015-03-19  Chris Dumez  <cdumez@apple.com>
+
+        Get rid of "CachePolicyCache" cache policy
+        https://bugs.webkit.org/show_bug.cgi?id=142881
+
+        Reviewed by Antti Koivisto.
+
+        Get rid of "CachePolicyCache" cache policy as it is unused.
+
+        * loader/cache/CachePolicy.h:
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
+        * page/DiagnosticLoggingKeys.h:
+
 2015-03-19  Alex Christensen  <achristensen@webkit.org>
 
         [Content Extensions] Test regular expression parse failures.
index a344ab0..b27685e 100644 (file)
@@ -29,7 +29,6 @@
 namespace WebCore {
 
     enum CachePolicy {
-        CachePolicyCache,
         CachePolicyVerify,
         CachePolicyRevalidate,
         CachePolicyReload,
index d49dd72..9689c43 100644 (file)
@@ -688,7 +688,7 @@ static inline void logResourceRevalidationReason(Frame* frame, const String& rea
 
 bool CachedResource::mustRevalidateDueToCacheHeaders(const CachedResourceLoader& cachedResourceLoader, CachePolicy cachePolicy) const
 {    
-    ASSERT(cachePolicy == CachePolicyRevalidate || cachePolicy == CachePolicyCache || cachePolicy == CachePolicyVerify);
+    ASSERT(cachePolicy == CachePolicyRevalidate || cachePolicy == CachePolicyVerify);
 
     if (cachePolicy == CachePolicyRevalidate) {
         logResourceRevalidationReason(cachedResourceLoader.frame(), DiagnosticLoggingKeys::reloadKey());
@@ -705,15 +705,6 @@ bool CachedResource::mustRevalidateDueToCacheHeaders(const CachedResourceLoader&
         return true;
     }
 
-    if (cachePolicy == CachePolicyCache) {
-        if (m_response.cacheControlContainsMustRevalidate() && isExpired()) {
-            LOG(ResourceLoading, "CachedResource %p mustRevalidate because of cachePolicy == CachePolicyCache and m_response.cacheControlContainsMustRevalidate() && isExpired()\n", this);
-            logResourceRevalidationReason(cachedResourceLoader.frame(), DiagnosticLoggingKeys::mustRevalidateIsExpiredKey());
-            return true;
-        }
-        return false;
-    }
-
     // CachePolicyVerify
     if (isExpired()) {
         LOG(ResourceLoading, "CachedResource %p mustRevalidate because of isExpired()\n", this);
index 5abf163..9ddd63c 100644 (file)
@@ -43,11 +43,6 @@ String DiagnosticLoggingKeys::missingValidatorFieldsKey()
     return ASCIILiteral("missingValidatorFields");
 }
 
-String DiagnosticLoggingKeys::mustRevalidateIsExpiredKey()
-{
-    return ASCIILiteral("mustRevalidateIsExpired");
-}
-
 String DiagnosticLoggingKeys::pluginLoadedKey()
 {
     return ASCIILiteral("pluginLoaded");
index 8880700..cb86b4e 100644 (file)
@@ -65,7 +65,6 @@ public:
     static String mediaLoadedKey();
     static String mediaLoadingFailedKey();
     WEBCORE_EXPORT static String missingValidatorFieldsKey();
-    static String mustRevalidateIsExpiredKey();
     static String navigationKey();
     WEBCORE_EXPORT static String networkCacheKey();
     static String networkKey();