#include "services/network/shared_dictionary/shared_dictionary_on_disk.h"
#include <string>
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "services/network/shared_dictionary/shared_dictionary_disk_cache.h"
namespace network {
namespace {
constexpr char kHistogramPrefix[] = …;
}
SharedDictionaryOnDisk::SharedDictionaryOnDisk(
size_t size,
const net::SHA256HashValue& hash,
const std::string& id,
const base::UnguessableToken& disk_cache_key_token,
SharedDictionaryDiskCache& disk_cahe,
base::OnceClosure disk_cache_error_callback,
base::ScopedClosureRunner on_deleted_closure_runner)
: … { … }
SharedDictionaryOnDisk::~SharedDictionaryOnDisk() = default;
int SharedDictionaryOnDisk::ReadAll(base::OnceCallback<void(int)> callback) { … }
scoped_refptr<net::IOBuffer> SharedDictionaryOnDisk::data() const { … }
size_t SharedDictionaryOnDisk::size() const { … }
const net::SHA256HashValue& SharedDictionaryOnDisk::hash() const { … }
const std::string& SharedDictionaryOnDisk::id() const { … }
void SharedDictionaryOnDisk::OnEntry(base::Time open_start_time,
disk_cache::EntryResult result) { … }
void SharedDictionaryOnDisk::OnDataRead(base::Time read_start_time,
int result) { … }
void SharedDictionaryOnDisk::SetState(State state) { … }
}