Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,26 +706,6 @@ String Cache::recordsPathIsolatedCopy() const
return m_storage->recordsPathIsolatedCopy();
}

void Cache::retrieveData(const DataKey& dataKey, Function<void(const uint8_t*, size_t)> completionHandler)
{
Key key { dataKey, m_storage->salt() };
m_storage->retrieve(key, 4, [completionHandler = WTFMove(completionHandler)] (auto record, auto) mutable {
if (!record || !record->body.size()) {
completionHandler(nullptr, 0);
return true;
}
completionHandler(record->body.data(), record->body.size());
return true;
});
}

void Cache::storeData(const DataKey& dataKey, const uint8_t* data, size_t size)
{
Key key { dataKey, m_storage->salt() };
Storage::Record record { key, WallTime::now(), { }, Data { data, size }, { } };
m_storage->store(record, { });
}

void Cache::fetchData(bool shouldComputeSize, CompletionHandler<void(Vector<WebsiteData::Entry>&&)>&& completionHandler)
{
HashMap<WebCore::SecurityOriginData, uint64_t> originsAndSizes;
Expand Down
3 changes: 0 additions & 3 deletions Source/WebKit/NetworkProcess/cache/NetworkCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ class Cache : public RefCounted<Cache> {
void clear();
void clear(WallTime modifiedSince, Function<void()>&&);

void retrieveData(const DataKey&, Function<void(const uint8_t*, size_t)>);
void storeData(const DataKey&, const uint8_t* data, size_t);

std::unique_ptr<Entry> makeEntry(const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, PrivateRelayed, RefPtr<WebCore::FragmentedSharedBuffer>&&);
std::unique_ptr<Entry> makeRedirectEntry(const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, const WebCore::ResourceRequest& redirectRequest);

Expand Down