#ifndef SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_STORAGE_H_
#define SERVICES_NETWORK_SHARED_DICTIONARY_SHARED_DICTIONARY_STORAGE_H_
#include <map>
#include <set>
#include <string>
#include "base/component_export.h"
#include "base/containers/contains.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "base/strings/pattern.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "url/gurl.h"
#include "url/scheme_host_port.h"
class GURL;
namespace net {
class HttpResponseHeaders;
class SharedDictionary;
}
namespace network {
namespace mojom {
enum class FetchResponseType : int32_t;
enum class RequestDestination : int32_t;
enum class RequestMode : int32_t;
enum class SharedDictionaryError : int32_t;
}
class SharedDictionaryWriter;
class SimpleUrlPatternMatcher;
class COMPONENT_EXPORT(NETWORK_SERVICE) SharedDictionaryStorage
: public base::RefCounted<SharedDictionaryStorage> { … };
template <class DictionaryInfoType>
DictionaryInfoType* GetMatchingDictionaryFromDictionaryInfoMap(
std::map<
url::SchemeHostPort,
std::map<std::tuple<std::string, std::set<mojom::RequestDestination>>,
DictionaryInfoType>>& dictionary_info_map,
const GURL& url,
mojom::RequestDestination destination) { … }
template <class DictionaryInfoType>
DictionaryInfoType* FindRegisteredInDictionaryInfoMap(
std::map<
url::SchemeHostPort,
std::map<std::tuple<std::string, std::set<mojom::RequestDestination>>,
DictionaryInfoType>>& dictionary_info_map,
const GURL& url,
base::Time response_time,
base::TimeDelta expiration,
const std::string& match,
const std::set<mojom::RequestDestination>& match_dest,
const std::string& id) { … }
}
#endif