summaryrefslogtreecommitdiffstats
path: root/WebCore/loader/appcache/ApplicationCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/loader/appcache/ApplicationCache.cpp')
-rw-r--r--WebCore/loader/appcache/ApplicationCache.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/WebCore/loader/appcache/ApplicationCache.cpp b/WebCore/loader/appcache/ApplicationCache.cpp
index 42f5b6a..3c29d68 100644
--- a/WebCore/loader/appcache/ApplicationCache.cpp
+++ b/WebCore/loader/appcache/ApplicationCache.cpp
@@ -39,6 +39,7 @@ namespace WebCore {
ApplicationCache::ApplicationCache()
: m_group(0)
, m_manifest(0)
+ , m_estimatedSizeInStorage(0)
, m_storageID(0)
{
}
@@ -86,7 +87,9 @@ void ApplicationCache::addResource(PassRefPtr<ApplicationCacheResource> resource
// Add the resource to the storage.
cacheStorage().store(resource.get(), this);
}
-
+
+ m_estimatedSizeInStorage += resource->estimatedSizeInStorage();
+
m_resources.set(url, resource);
}
@@ -100,7 +103,9 @@ unsigned ApplicationCache::removeResource(const String& url)
unsigned type = it->second->type();
m_resources.remove(it);
-
+
+ m_estimatedSizeInStorage -= it->second->estimatedSizeInStorage();
+
return type;
}