Remove ResourceResponse::cacheBodyKey API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 12:01:48 +0000 (12:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Jul 2018 12:01:48 +0000 (12:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188192

Patch by Rob Buis <rbuis@igalia.com> on 2018-07-31
Reviewed by Frédéric Wang.

Source/WebCore:

Removed unused API.

No new tests needed since this API is not used.

* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::encode const):
(WebCore::ResourceResponseBase::decode):
(WebCore::ResourceResponseBase::cacheBodyKey const): Deleted.
(WebCore::ResourceResponseBase::setCacheBodyKey): Deleted.

Source/WebKit:

Remove unused API.

* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::decodeStorageRecord):

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

Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/NetworkCacheEntry.cpp

index 8cb42ce..a2e1399 100644 (file)
@@ -1,3 +1,20 @@
+2018-07-31  Rob Buis  <rbuis@igalia.com>
+
+        Remove ResourceResponse::cacheBodyKey API
+        https://bugs.webkit.org/show_bug.cgi?id=188192
+
+        Reviewed by Frédéric Wang.
+
+        Removed unused API.
+
+        No new tests needed since this API is not used.
+
+        * platform/network/ResourceResponseBase.h:
+        (WebCore::ResourceResponseBase::encode const):
+        (WebCore::ResourceResponseBase::decode):
+        (WebCore::ResourceResponseBase::cacheBodyKey const): Deleted.
+        (WebCore::ResourceResponseBase::setCacheBodyKey): Deleted.
+
 2018-07-30  Simon Fraser  <simon.fraser@apple.com>
 
         Shrink GraphicsLayerCA
index 3fdee5e..2a4e49e 100644 (file)
@@ -32,7 +32,6 @@
 #include "NetworkLoadMetrics.h"
 #include "ParsedContentRange.h"
 #include "URL.h"
-#include <wtf/SHA1.h>
 #include <wtf/WallTime.h>
 
 namespace WebCore {
@@ -150,9 +149,6 @@ public:
         m_source = source;
     }
 
-    const std::optional<SHA1::Digest>& cacheBodyKey() const { return m_cacheBodyKey; }
-    void setCacheBodyKey(const SHA1::Digest& key) { m_cacheBodyKey = key; }
-
     // FIXME: This should be eliminated from ResourceResponse.
     // Network loading metrics should be delivered via didFinishLoad
     // and should not be part of the ResourceResponse.
@@ -224,7 +220,6 @@ private:
     mutable std::optional<WallTime> m_lastModified;
     mutable ParsedContentRange m_contentRange;
     mutable CacheControlDirectives m_cacheControlDirectives;
-    std::optional<SHA1::Digest> m_cacheBodyKey;
 
     mutable bool m_haveParsedCacheControlHeader { false };
     mutable bool m_haveParsedAgeHeader { false };
@@ -270,7 +265,6 @@ void ResourceResponseBase::encode(Encoder& encoder) const
     encoder << m_httpStatusCode;
     encoder << m_certificateInfo;
     encoder.encodeEnum(m_source);
-    encoder << m_cacheBodyKey;
     encoder.encodeEnum(m_type);
     encoder.encodeEnum(m_tainting);
     encoder << m_isRedirected;
@@ -311,8 +305,6 @@ bool ResourceResponseBase::decode(Decoder& decoder, ResourceResponseBase& respon
         return false;
     if (!decoder.decodeEnum(response.m_source))
         return false;
-    if (!decoder.decode(response.m_cacheBodyKey))
-        return false;
     if (!decoder.decodeEnum(response.m_type))
         return false;
     if (!decoder.decodeEnum(response.m_tainting))
index ed49439..713ea73 100644 (file)
@@ -1,3 +1,15 @@
+2018-07-31  Rob Buis  <rbuis@igalia.com>
+
+        Remove ResourceResponse::cacheBodyKey API
+        https://bugs.webkit.org/show_bug.cgi?id=188192
+
+        Reviewed by Frédéric Wang.
+
+        Remove unused API.
+
+        * NetworkProcess/cache/NetworkCacheEntry.cpp:
+        (WebKit::NetworkCache::Entry::decodeStorageRecord):
+
 2018-07-30  Sihui Liu  <sihui_liu@apple.com>
 
         Add support for fetching and remove type  _WKWebsiteDataTypeHSTSCache
index ce2add2..ae1188a 100644 (file)
@@ -113,8 +113,6 @@ std::unique_ptr<Entry> Entry::decodeStorageRecord(const Storage::Record& storage
     if (!decoder.decode(entry->m_response))
         return nullptr;
     entry->m_response.setSource(WebCore::ResourceResponse::Source::DiskCache);
-    if (storageEntry.bodyHash)
-        entry->m_response.setCacheBodyKey(*storageEntry.bodyHash);
 
     bool hasVaryingRequestHeaders;
     if (!decoder.decode(hasVaryingRequestHeaders))