#include "components/omnibox/browser/zero_suggest_cache_service.h"
#include <iterator>
#include <memory>
#include <utility>
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "base/values.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_provider_client.h"
#include "components/omnibox/browser/autocomplete_scheme_classifier.h"
#include "components/omnibox/browser/omnibox_prefs.h"
#include "components/omnibox/browser/search_suggestion_parser.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/prefs/pref_service.h"
CacheEntry;
CacheEntrySuggestResult;
ZeroSuggestCacheService::ZeroSuggestCacheService(
std::unique_ptr<AutocompleteSchemeClassifier> scheme_classifier,
PrefService* prefs,
size_t cache_size)
: … { … }
ZeroSuggestCacheService::~ZeroSuggestCacheService() { … }
CacheEntry ZeroSuggestCacheService::ReadZeroSuggestResponse(
const std::string& page_url) const { … }
void ZeroSuggestCacheService::StoreZeroSuggestResponse(
const std::string& page_url,
const std::string& response_json) { … }
void ZeroSuggestCacheService::ClearCache() { … }
bool ZeroSuggestCacheService::IsInMemoryCacheEmptyForTesting() const { … }
void ZeroSuggestCacheService::AddObserver(Observer* observer) { … }
void ZeroSuggestCacheService::RemoveObserver(Observer* observer) { … }
std::vector<CacheEntrySuggestResult> ZeroSuggestCacheService::GetSuggestResults(
const CacheEntry& cache_entry) const { … }