Summary: | Factor calculation of cache sizes based on cache model into shared function. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | WebKit2 | Assignee: | 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
Sam Weinig
2010-10-29 19:20:16 PDT
Created attachment 72426 [details]
Patch
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] 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. |