#include "components/services/app_service/public/cpp/icon_cache.h"
#include <utility>
#include "base/functional/callback.h"
#include "base/metrics/histogram_functions.h"
namespace apps {
void RecordIconLoadMethodMetrics(IconLoadingMethod icon_loading_method) { … }
IconCache::Value::Value()
: … { … }
IconValuePtr IconCache::Value::AsIconValue(IconType icon_type) { … }
IconCache::IconCache(IconLoader* wrapped_loader,
GarbageCollectionPolicy gc_policy)
: … { … }
IconCache::~IconCache() = default;
std::optional<IconKey> IconCache::GetIconKey(const std::string& id) { … }
std::unique_ptr<IconLoader::Releaser> IconCache::LoadIconFromIconKey(
const std::string& id,
const IconKey& icon_key,
IconType icon_type,
int32_t size_hint_in_dip,
bool allow_placeholder_icon,
apps::LoadIconCallback callback) { … }
void IconCache::SweepReleasedIcons() { … }
void IconCache::RemoveIcon(const std::string& id) { … }
void IconCache::Update(const IconLoader::Key& key,
const IconValue& icon_value) { … }
void IconCache::OnLoadIcon(const IconLoader::Key& key,
apps::LoadIconCallback callback,
IconValuePtr icon_value) { … }
void IconCache::OnRelease(IconLoader::Key key) { … }
}