| Summary: | [curl] Add storage limit to cache manager | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mátyás Mustoha <mmatyas> | ||||||||
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | bfulgham, commit-queue, galpeter, peavo | ||||||||
| Priority: | P2 | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Mátyás Mustoha
2013-12-16 06:56:21 PST
Created attachment 219314 [details]
Proposed patch
Created attachment 219646 [details]
Proposed patch 2
Fixed entry size function, added a method for changing storage size and did some refactoring.
anyone? Comment on attachment 219646 [details] Proposed patch 2 View in context: https://bugs.webkit.org/attachment.cgi?id=219646&action=review This change seems fine, but I think it could be a little better if we used C++11 auto types. I'm also not sure the 'long long' declaration is a good idea here. > Source/WebCore/platform/network/curl/CurlCacheEntry.cpp:345 > + long long contentFileSize; It might be better to use a specific size here, such as uint64_t/int64_t. > Source/WebCore/platform/network/curl/CurlCacheManager.cpp:169 > + ListHashSet<String>::iterator end = m_LRUEntryList.end(); Make these 'auto'. In fact, they should probably be const. Created attachment 221972 [details]
Proposed patch 3
Thanks for the review! I changed the iterator to auto in the patch, could you check if it's fine like that?
I agree that 'long long' isn't specific enough, but getFileSize() expects a long long by reference.
Comment on attachment 221972 [details]
Proposed patch 3
r=me. Thanks for revising the original patch!
Comment on attachment 221972 [details] Proposed patch 3 Clearing flags on attachment: 221972 Committed r162618: <http://trac.webkit.org/changeset/162618> All reviewed patches have been landed. Closing bug. |