[webkit-reviews] review granted: [Bug 48706] Factor calculation of cache sizes based on cache model into shared function. : [Attachment 72426] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 5 08:30:21 PDT 2010


Adam Roben (aroben) <aroben at apple.com> has granted Sam Weinig
<sam at webkit.org>'s request for review:
Bug 48706: Factor calculation of cache sizes based on cache model into shared
function.
https://bugs.webkit.org/show_bug.cgi?id=48706

Attachment 72426: Patch
https://bugs.webkit.org/attachment.cgi?id=72426&action=review

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
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.


More information about the webkit-reviews mailing list