Factor calculation of cache sizes based on cache model into shared function.
Created attachment 72426 [details]
BTW, what's your plan w.r.t. the memory cache and multiprocess?
(In reply to comment #2)
> BTW, what's your plan w.r.t. the memory cache and multiprocess?
The current model uses a single process for all windows/tabs, so this has not been a problem we have had to solve yet. It will be an interesting problem to try and solve when the time comes though.
Comment on attachment 72426 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=72426&action=review
> + void calculateCacheSizes(CacheModel cacheModel, uint64_t memorySize, uint64_t diskFreeSize,
Seems like this can be a static member function.
> void WebProcess::platformSetCacheModel(CacheModel cacheModel)
> + NSURLCache *nsurlCache = [NSURLCache sharedURLCache];
Why did you move this up to the top? Was it a bug that it was lower down before? You should explain this in your ChangeLog.
> + [nsurlCache setDiskCapacity:std::max(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
Why is std:: needed here? Normally we use "using namespace std;" so you don't have to write that.
Landed in r71658.