[curl] Add storage limit to cache manager
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jan 2014 17:53:14 +0000 (17:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Jan 2014 17:53:14 +0000 (17:53 +0000)
commit01fb5f8608fc5d2eee5ec745f1074643713f9217
treecc32b2b9e1884b5705a7a87849a4f6f96a2e6f88
parentec6f5221f1711d1069e81bdf5d969fd1b3224c14
[curl] Add storage limit to cache manager
https://bugs.webkit.org/show_bug.cgi?id=125779

Patch by Mátyás Mustoha <mmatyas@inf.u-szeged.hu> on 2014-01-23
Reviewed by Brent Fulgham.

Sets a local disc storage size limit for the cache manager
used by the curl network backend.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::CurlCacheEntry):
(WebCore::CurlCacheEntry::isCached):
(WebCore::CurlCacheEntry::saveCachedData):
(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::didFail):
(WebCore::CurlCacheEntry::didFinishLoading):
(WebCore::CurlCacheEntry::loadFileToBuffer):
(WebCore::CurlCacheEntry::parseResponseHeaders):
(WebCore::CurlCacheEntry::entrySize):
* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::requestHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::CurlCacheManager):
(WebCore::CurlCacheManager::setStorageSizeLimit):
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::saveIndex):
(WebCore::CurlCacheManager::makeRoomForNewEntry):
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didReceiveData):
(WebCore::CurlCacheManager::invalidateCacheEntry):
(WebCore::CurlCacheManager::readCachedData):
* platform/network/curl/CurlCacheManager.h:
(WebCore::CurlCacheManager::cacheDirectory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/CurlCacheEntry.cpp
Source/WebCore/platform/network/curl/CurlCacheEntry.h
Source/WebCore/platform/network/curl/CurlCacheManager.cpp
Source/WebCore/platform/network/curl/CurlCacheManager.h