5#ifndef FLUTTER_SHELL_COMMON_RESOURCE_CACHE_LIMIT_CALCULATOR_H_
6#define FLUTTER_SHELL_COMMON_RESOURCE_CACHE_LIMIT_CALCULATOR_H_
9#include <unordered_map>
11#include "flutter/fml/macros.h"
12#include "flutter/fml/memory/weak_ptr.h"
28 : max_bytes_threshold_(max_bytes_threshold) {}
35 items_.push_back(item);
43 std::vector<fml::WeakPtr<ResourceCacheLimitItem>> items_;
44 size_t max_bytes_threshold_;
void AddResourceCacheLimitItem(const fml::WeakPtr< ResourceCacheLimitItem > &item)
size_t GetResourceCacheMaxBytes()
~ResourceCacheLimitCalculator()=default
ResourceCacheLimitCalculator(size_t max_bytes_threshold)
virtual size_t GetResourceCacheLimit()=0
virtual ~ResourceCacheLimitItem()=default