chromium/services/network/shared_dictionary/shared_dictionary_manager.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_MANAGER_H_
#define SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_MANAGER_H_

#include <map>
#include <memory>

#include "base/component_export.h"
#include "base/containers/lru_cache.h"
#include "base/containers/unique_ptr_adapters.h"
#include "base/functional/callback.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "net/disk_cache/disk_cache.h"
#include "net/extras/shared_dictionary/shared_dictionary_usage_info.h"
#include "net/shared_dictionary/shared_dictionary_getter.h"
#include "net/shared_dictionary/shared_dictionary_isolation_key.h"
#include "services/network/public/mojom/network_context.mojom.h"

namespace base {
class FilePath;
}  //  namespace base

namespace disk_cache {
class BackendFileOperationsFactory;
}  // namespace disk_cache

namespace network {
namespace cors {
class CorsURLLoaderSharedDictionaryTest;
}  // namespace cors
namespace mojom {
enum class RequestDestination;
}  // namespace mojom

class SharedDictionaryStorage;

// This class is attached to NetworkContext and manages the dictionaries for
// CompressionDictionaryTransport feature.
class COMPONENT_EXPORT(NETWORK_SERVICE) SharedDictionaryManager {};

// Creates a network::mojom::SharedDictionaryInfo from a `DictionaryInfoType`.
// This is a template method because SharedDictionaryManagerOnDisk and
// SharedDictionaryManagerInMemory are using different class for
// DictionaryInfoType.
template <class DictionaryInfoType>
network::mojom::SharedDictionaryInfoPtr ToMojoSharedDictionaryInfo(
    const DictionaryInfoType& info) {}

}  // namespace network

#endif  // SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_MANAGER_H_