Exemplo n.º 1
0
void WebCache::getResourceTypeStats(ResourceTypeStats* result)
{
    MemoryCache* cache = memoryCache();
    if (cache) {
        MemoryCache::Statistics stats = cache->getStatistics();
        ToResourceTypeStat(stats.images, result->images);
        ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets);
        ToResourceTypeStat(stats.scripts, result->scripts);
        ToResourceTypeStat(stats.fonts, result->fonts);
    } else
        memset(result, 0, sizeof(WebCache::ResourceTypeStats));
}
Exemplo n.º 2
0
void WebCache::getResourceTypeStats(ResourceTypeStats* result)
{
    Cache* cache = WebCore::cache();
    if (cache) {
        Cache::Statistics stats = cache->getStatistics();
        ToResourceTypeStat(stats.images, result->images);
        ToResourceTypeStat(stats.cssStyleSheets, result->cssStyleSheets);
        ToResourceTypeStat(stats.scripts, result->scripts);
#if ENABLE(XSLT)
        ToResourceTypeStat(stats.xslStyleSheets, result->xslStyleSheets);
#else
        memset(&result->xslStyleSheets, 0, sizeof(result->xslStyleSheets));
#endif
        ToResourceTypeStat(stats.fonts, result->fonts);
    } else
        memset(result, 0, sizeof(WebCache::ResourceTypeStats));
}