11 size_t max_bytes_threshold = max_bytes_threshold_ > 0
12 ? max_bytes_threshold_
13 : std::numeric_limits<size_t>::max();
14 std::vector<fml::WeakPtr<ResourceCacheLimitItem>> live_items;
15 for (
const auto& item : items_) {
17 live_items.push_back(item);
18 max_bytes += item->GetResourceCacheLimit();
21 items_ = std::move(live_items);
22 return std::min(max_bytes, max_bytes_threshold);