void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins) { CachedResourceMap::iterator e = m_resources.end(); for (CachedResourceMap::iterator it = m_resources.begin(); it != e; ++it) #if ENABLE(CACHE_PARTITIONING) origins.add(SecurityOrigin::createFromString(it->value->begin()->value->url())); #else origins.add(SecurityOrigin::createFromString(it->value->url())); #endif }
void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins) { #if ENABLE(CACHE_PARTITIONING) static NeverDestroyed<String> httpString("http"); #endif for (auto& resources : m_sessionResources.values()) { for (auto& keyValue : *resources) { auto& resource = *keyValue.value; #if ENABLE(CACHE_PARTITIONING) auto& partitionName = keyValue.key.second; if (!partitionName.isEmpty()) origins.add(SecurityOrigin::create(httpString, partitionName, 0)); else #endif origins.add(SecurityOrigin::create(resource.url())); } } }