Changeset 145419 in webkit
- Timestamp:
- Mar 11, 2013 3:38:27 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r145416 r145419 1 2013-03-11 Jeffrey Pfau <jpfau@apple.com> 2 3 List cache partitions as units instead of as their contents 4 https://bugs.webkit.org/show_bug.cgi?id=111909 5 6 Reviewed by Maciej Stachowiak. 7 8 Not possible to test with current automated test tools, must be tested manually. 9 10 * loader/cache/MemoryCache.cpp: 11 (WebCore::MemoryCache::getOriginsWithCache): List a cache item as a member of a partition, if possible 12 1 13 2013-03-11 Alexey Proskuryakov <ap@apple.com> 2 14 -
trunk/Source/WebCore/loader/cache/MemoryCache.cpp
r145161 r145419 601 601 void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins) 602 602 { 603 #if ENABLE(CACHE_PARTITIONING) 604 DEFINE_STATIC_LOCAL(String, httpString, ("http")); 605 #endif 603 606 CachedResourceMap::iterator e = m_resources.end(); 604 for (CachedResourceMap::iterator it = m_resources.begin(); it != e; ++it) 605 #if ENABLE(CACHE_PARTITIONING) 606 origins.add(SecurityOrigin::createFromString(it->value->begin()->value->url())); 607 for (CachedResourceMap::iterator it = m_resources.begin(); it != e; ++it) { 608 #if ENABLE(CACHE_PARTITIONING) 609 if (it->value->begin()->key == emptyString()) 610 origins.add(SecurityOrigin::createFromString(it->value->begin()->value->url())); 611 else 612 origins.add(SecurityOrigin::create(httpString, it->value->begin()->key, 0)); 607 613 #else 608 614 origins.add(SecurityOrigin::createFromString(it->value->url())); 609 615 #endif 616 } 610 617 } 611 618 -
trunk/Source/WebKit2/ChangeLog
r145409 r145419 1 2013-03-11 Jeffrey Pfau <jpfau@apple.com> 2 3 List cache partitions as units instead of as their contents 4 https://bugs.webkit.org/show_bug.cgi?id=111909 5 6 Reviewed by Maciej Stachowiak. 7 8 * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: 9 (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Attempt to enumerate cache partitions based on information we have 10 1 11 2013-01-30 Jer Noble <jer.noble@apple.com> 2 12 -
trunk/Source/WebKit2/WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp
r145161 r145419 58 58 RetainPtr<CFArrayRef> WebResourceCacheManager::cfURLCacheHostNames() 59 59 { 60 return RetainPtr<CFArrayRef>(AdoptCF, WKCFURLCacheCopyAllHostNamesInPersistentStore()); 60 RetainPtr<CFArrayRef> hostNames(AdoptCF, WKCFURLCacheCopyAllHostNamesInPersistentStore()); 61 #if ENABLE(CACHE_PARTITIONING) 62 RetainPtr<CFMutableArrayRef> partitions(AdoptCF, CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks)); 63 CFIndex size = CFArrayGetCount(hostNames.get()); 64 for (CFIndex i = 0; i < size; ++i) { 65 RetainPtr<CFStringRef> partition = partitionName(static_cast<CFStringRef>(CFArrayGetValueAtIndex(hostNames.get(), i))); 66 RetainPtr<CFArrayRef> partitionHostNames(AdoptCF, WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(partition.get())); 67 if (CFArrayGetCount(partitionHostNames.get())) 68 CFArrayAppendValue(partitions.get(), partition.get()); 69 } 70 71 RetainPtr<CFArrayRef> rootHostNames(AdoptCF, WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition(CFSTR(""))); 72 CFArrayAppendArray(partitions.get(), rootHostNames.get(), CFRangeMake(0, CFArrayGetCount(rootHostNames.get()))); 73 return partitions; 74 #else 75 return hostNames; 76 #endif 61 77 } 62 78
Note: See TracChangeset
for help on using the changeset viewer.