Bug 48706

Summary: Factor calculation of cache sizes based on cache model into shared function.
Product: WebKit Reporter: Sam Weinig <sam>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch aroben: review+

Sam Weinig
Reported 2010-10-29 19:20:16 PDT
Factor calculation of cache sizes based on cache model into shared function.
Attachments
Patch (23.24 KB, patch)
2010-10-29 19:21 PDT, Sam Weinig
aroben: review+
Sam Weinig
Comment 1 2010-10-29 19:21:36 PDT
Adam Barth
Comment 2 2010-10-29 23:14:38 PDT
BTW, what's your plan w.r.t. the memory cache and multiprocess?
Sam Weinig
Comment 3 2010-11-05 04:03:17 PDT
(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.
Adam Roben (:aroben)
Comment 4 2010-11-05 08:30:21 PDT
Comment on attachment 72426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=72426&action=review > WebKit2/WebProcess/WebProcess.h:106 > + void calculateCacheSizes(CacheModel cacheModel, uint64_t memorySize, uint64_t diskFreeSize, Seems like this can be a static member function. > WebKit2/WebProcess/mac/WebProcessMac.mm:67 > 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. > WebKit2/WebProcess/mac/WebProcessMac.mm:94 > + [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.
Sam Weinig
Comment 5 2010-11-09 11:29:10 PST
Landed in r71658.
Note You need to log in before you can comment on or make changes to this bug.