[WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 20:17:00 +0000 (20:17 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 20:17:00 +0000 (20:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143137

Reviewed by Antti Koivisto.

Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
think it is more accurate. It is not the request that needs revalidating.
The requests just requires us to revalidate the response.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::requestRequiresRevalidation):
(WebKit::NetworkCache::canUse):
(WebKit::NetworkCache::requestNeedsRevalidation): Deleted.

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

Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

index 9e3c9d7..37662b4 100644 (file)
@@ -1,3 +1,19 @@
+2015-03-27  Chris Dumez  <cdumez@apple.com>
+
+        [WK2][NetworkCache] Rename requestNeedsRevalidation() to requestRequiresRevalidation()
+        https://bugs.webkit.org/show_bug.cgi?id=143137
+
+        Reviewed by Antti Koivisto.
+
+        Rename requestNeedsRevalidation() to requestRequiresRevalidation() as I
+        think it is more accurate. It is not the request that needs revalidating.
+        The requests just requires us to revalidate the response.
+
+        * NetworkProcess/cache/NetworkCache.cpp:
+        (WebKit::NetworkCache::requestRequiresRevalidation):
+        (WebKit::NetworkCache::canUse):
+        (WebKit::NetworkCache::requestNeedsRevalidation): Deleted.
+
 2015-03-27  Oliver Hunt  <oliver@apple.com>
 
         Forward additional CFNetwork ATS information to child processes
index 302c907..cac03d5 100644 (file)
@@ -169,7 +169,7 @@ static bool responseHasExpired(const WebCore::ResourceResponse& response, std::c
     return hasExpired;
 }
 
-static bool requestNeedsRevalidation(const WebCore::ResourceRequest& request)
+static bool requestRequiresRevalidation(const WebCore::ResourceRequest& request)
 {
     auto requestDirectives = WebCore::parseCacheControlDirectives(request.httpHeaderFields());
     if (requestDirectives.noCache)
@@ -192,7 +192,7 @@ static UseDecision canUse(const Entry& entry, const WebCore::ResourceRequest& re
     if (cachePolicyAllowsExpired(request.cachePolicy()))
         return UseDecision::Use;
 
-    bool needsRevalidation = requestNeedsRevalidation(request) || responseHasExpired(entry.response(), entry.timeStamp());
+    bool needsRevalidation = requestRequiresRevalidation(request) || responseHasExpired(entry.response(), entry.timeStamp());
     if (!needsRevalidation)
         return UseDecision::Use;