#include "services/network/shared_dictionary/shared_dictionary_disk_cache.h"
#include <limits>
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_id_helper.h"
namespace network {
namespace {
void RunTaskAndCallback(
base::OnceCallback<int(net::CompletionOnceCallback)> task,
net::CompletionOnceCallback callback) { … }
void RunTaksAndEntryResultCallback(
base::OnceCallback<disk_cache::EntryResult(disk_cache::EntryResultCallback)>
task,
disk_cache::EntryResultCallback callback) { … }
}
SharedDictionaryDiskCache::SharedDictionaryDiskCache() = default;
void SharedDictionaryDiskCache::Initialize(
const base::FilePath& cache_directory_path,
#if BUILDFLAG(IS_ANDROID)
disk_cache::ApplicationStatusListenerGetter app_status_listener_getter,
#endif
scoped_refptr<disk_cache::BackendFileOperationsFactory>
file_operations_factory) { … }
SharedDictionaryDiskCache::~SharedDictionaryDiskCache() = default;
disk_cache::BackendResult SharedDictionaryDiskCache::CreateCacheBackend(
const base::FilePath& cache_directory_path,
#if BUILDFLAG(IS_ANDROID)
disk_cache::ApplicationStatusListenerGetter app_status_listener_getter,
#endif
scoped_refptr<disk_cache::BackendFileOperationsFactory>
file_operations_factory,
disk_cache::BackendResultCallback callback) { … }
disk_cache::EntryResult SharedDictionaryDiskCache::OpenOrCreateEntry(
const std::string& key,
bool create,
disk_cache::EntryResultCallback callback) { … }
int SharedDictionaryDiskCache::DoomEntry(const std::string& key,
net::CompletionOnceCallback callback) { … }
int SharedDictionaryDiskCache::ClearAll(net::CompletionOnceCallback callback) { … }
void SharedDictionaryDiskCache::CreateIterator(
base::OnceCallback<void(std::unique_ptr<disk_cache::Backend::Iterator>)>
callback) { … }
void SharedDictionaryDiskCache::DidCreateBackend(
disk_cache::BackendResult result) { … }
}