chromium/services/network/shared_dictionary/shared_dictionary_on_disk.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_ON_DISK_H_
#define SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_ON_DISK_H_

#include <string>

#include "base/component_export.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"
#include "net/base/hash_value.h"
#include "net/disk_cache/disk_cache.h"
#include "net/shared_dictionary/shared_dictionary.h"

namespace net {
class IOBufferWithSize;
}  // namespace net

namespace network {

class SharedDictionaryDiskCache;

// A SharedDictionary that can be retrieved from the SharedDictionaryDiskCache.
// This class starts loading the disk cache entry in the constructor. So
// ReadAll() may synchronously return OK if the data has been loaded into memory
// when the method is called.
class COMPONENT_EXPORT(NETWORK_SERVICE) SharedDictionaryOnDisk
    : public net::SharedDictionary {};

}  // namespace network

#endif  // SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_ON_DISK_H_