Move cache coders to WTF
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2017 12:43:49 +0000 (12:43 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Jan 2017 12:43:49 +0000 (12:43 +0000)
commit459f6c6ecc9bf03cce84ce5f157282ea9f7eaa8c
tree06fc7cf4ec696127698cc91f10bae3e65357f65c
parent25f0a117717cf4ff20c89a9243796bb0759513eb
Move cache coders to WTF
https://bugs.webkit.org/show_bug.cgi?id=166825

Rubber-stamped by Sam Weinig.

Source/WebKit2:

* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheCoder.h: Removed.
* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.
* NetworkProcess/cache/NetworkCacheCoders.h:
(): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.
* NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
(WebKit::NetworkCache::encodeCFData): Deleted.
(WebKit::NetworkCache::decodeCFData): Deleted.
(WebKit::NetworkCache::encodeSecTrustRef): Deleted.
(WebKit::NetworkCache::decodeSecTrustRef): Deleted.
(WebKit::NetworkCache::encodeCertificateChain): Deleted.
(WebKit::NetworkCache::decodeCertificateChain): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::CertificateInfo>::decode): Deleted.
* NetworkProcess/cache/NetworkCacheDecoder.cpp: Removed.
* NetworkProcess/cache/NetworkCacheDecoder.h: Removed.
* NetworkProcess/cache/NetworkCacheEncoder.cpp: Removed.
* NetworkProcess/cache/NetworkCacheEncoder.h: Removed.
* NetworkProcess/cache/NetworkCacheEntry.cpp:
(WebKit::NetworkCache::Entry::encodeAsStorageRecord):
(WebKit::NetworkCache::Entry::decodeStorageRecord):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::Key::encode):
(WebKit::NetworkCache::Key::decode):
* NetworkProcess/cache/NetworkCacheKey.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::decodeRecordMetaData):
(WebKit::NetworkCache::encodeRecordMetaData):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:
(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):
(WebKit::NetworkCache::SubresourcesEntry::encodeAsStorageRecord):
(WebKit::NetworkCache::SubresourcesEntry::decodeStorageRecord):
* NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:
* UIProcess/API/APIUserContentExtensionStore.cpp:
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

Make it possible to use robust serialization of WTF types on the lower levels of the stack.

* WTF.xcodeproj/project.pbxproj:
* wtf/persistence: Added.
* wtf/persistence/Coder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoder.h.
(WebKit::NetworkCache::Coder::encode): Deleted.
(WebKit::NetworkCache::Coder::decode): Deleted.
* wtf/persistence/Coders.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp.
(WebKit::NetworkCache::Coder<AtomicString>::encode): Deleted.
(WebKit::NetworkCache::Coder<AtomicString>::decode): Deleted.
(WebKit::NetworkCache::Coder<CString>::encode): Deleted.
(WebKit::NetworkCache::Coder<CString>::decode): Deleted.
(WebKit::NetworkCache::Coder<String>::encode): Deleted.
(WebKit::NetworkCache::decodeStringText): Deleted.
(WebKit::NetworkCache::Coder<String>::decode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::encode): Deleted.
(WebKit::NetworkCache::Coder<SHA1::Digest>::decode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::encode): Deleted.
(WebKit::NetworkCache::Coder<WebCore::HTTPHeaderMap>::decode): Deleted.
* wtf/persistence/Coders.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.h.
(WebKit::NetworkCache::Coder<std::optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<std::optional<T>>::decode): Deleted.
* wtf/persistence/Decoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.cpp.
(WebKit::NetworkCache::Decoder::Decoder): Deleted.
(WebKit::NetworkCache::Decoder::~Decoder): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCache::Decoder::decodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Decoder::decodeNumber): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::verifyChecksum): Deleted.
* wtf/persistence/Decoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h.
(WebKit::NetworkCache::Decoder::length): Deleted.
(WebKit::NetworkCache::Decoder::currentOffset): Deleted.
(WebKit::NetworkCache::Decoder::decodeEnum): Deleted.
(WebKit::NetworkCache::Decoder::decode): Deleted.
(WebKit::NetworkCache::Decoder::bufferIsLargeEnoughToContain): Deleted.
* wtf/persistence/Encoder.cpp: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.cpp.
(WebKit::NetworkCache::Encoder::Encoder): Deleted.
(WebKit::NetworkCache::Encoder::~Encoder): Deleted.
(WebKit::NetworkCache::Encoder::grow): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForData): Deleted.
(WebKit::NetworkCache::Encoder::encodeFixedLengthData): Deleted.
(WebKit::NetworkCache::Encoder::encodeNumber): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::encodeChecksum): Deleted.
* wtf/persistence/Encoder.h: Copied from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h.
(WebKit::NetworkCache::Encoder::encodeEnum): Deleted.
(WebKit::NetworkCache::Encoder::encode): Deleted.
(WebKit::NetworkCache::Encoder::operator<<): Deleted.
(WebKit::NetworkCache::Encoder::buffer): Deleted.
(WebKit::NetworkCache::Encoder::bufferSize): Deleted.
(WebKit::NetworkCache::Encoder::updateChecksumForNumber): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/persistence/Coder.h [moved from Source/WebKit2/NetworkProcess/cache/NetworkCacheCoder.h with 92% similarity]
Source/WTF/wtf/persistence/Coders.cpp [new file with mode: 0644]
Source/WTF/wtf/persistence/Coders.h [new file with mode: 0644]
Source/WTF/wtf/persistence/Decoder.cpp [moved from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.cpp with 95% similarity]
Source/WTF/wtf/persistence/Decoder.h [moved from Source/WebKit2/NetworkProcess/cache/NetworkCacheDecoder.h with 76% similarity]
Source/WTF/wtf/persistence/Encoder.cpp [moved from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.cpp with 96% similarity]
Source/WTF/wtf/persistence/Encoder.h [moved from Source/WebKit2/NetworkProcess/cache/NetworkCacheEncoder.h with 81% similarity]
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheCoders.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheCodersCocoa.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheCodersSoup.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheKey.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheSubresourcesEntry.h
Source/WebKit2/UIProcess/API/APIUserContentExtensionStore.cpp
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj