RESOLVED FIXED 54886
WebResourceCacheManager needs to manage the CFURLCache
https://bugs.webkit.org/show_bug.cgi?id=54886
Summary WebResourceCacheManager needs to manage the CFURLCache
Brian Weinstein
Reported 2011-02-21 09:07:52 PST
WebResourceCacheManager needs to manage the CFURLCache It currently only supposed the WebCore memory cache. It should also support the CFURLCache on platforms that use CFNetwork.
Attachments
[PATCH] Fix (12.99 KB, patch)
2011-02-21 09:14 PST, Brian Weinstein
aroben: review+
[PATCH] Take 2 - Old Mac Project File (11.24 KB, patch)
2011-02-21 10:51 PST, Brian Weinstein
aroben: review+
[PATCH] Take 3 - Mac Project File + Feature Define (12.40 KB, patch)
2011-02-21 12:47 PST, Brian Weinstein
aroben: review+
Brian Weinstein
Comment 1 2011-02-21 09:14:13 PST
Created attachment 83171 [details] [PATCH] Fix
Adam Roben (:aroben)
Comment 2 2011-02-21 09:20:42 PST
Comment on attachment 83171 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=83171&action=review I think you should share the Mac and Windows code by putting it in a new WebProcess/ResourceCache/cfnet/WebResourceCacheManagerCFNet.cpp and using a macro or an inline function to make it so you can use the same function names on both platforms. If you do that you should probably upload a new patch. > Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp:72 > + CFStringRef host = (CFStringRef) CFArrayGetValueAtIndex(cfURLHosts.get(), i); Please use a C++ cast. > Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.cpp:73 > + origins.add(SecurityOrigin::create("http", host, 0)); Should we store "http" in a String so we don't do the char*->String conversion on every iteration of the loop? > Source/WebKit2/WebProcess/ResourceCache/WebResourceCacheManager.h:63 > + CFArrayRef cfURLCacheHostNames() const; > + void clearCFURLCacheForHostNames(CFArrayRef) const; The getter should return a RetainPtr. Maybe these should be static member functions?
Build Bot
Comment 3 2011-02-21 09:25:19 PST
Brian Weinstein
Comment 4 2011-02-21 10:51:01 PST
Created attachment 83190 [details] [PATCH] Take 2 - Old Mac Project File The Mac project file hasn't been updated yet with the refactoring to WebResourceCacheManagerCFNet yet, but will be before landing.
Adam Roben (:aroben)
Comment 5 2011-02-21 10:53:45 PST
Comment on attachment 83190 [details] [PATCH] Take 2 - Old Mac Project File Brian said he's going to update WebKit2.xcodeproj soon, once he can use his Mac again. And that he'll update WKSI before checking in.
Build Bot
Comment 6 2011-02-21 11:15:22 PST
Brian Weinstein
Comment 7 2011-02-21 12:47:56 PST
Created attachment 83205 [details] [PATCH] Take 3 - Mac Project File + Feature Define
Build Bot
Comment 8 2011-02-21 13:54:17 PST
Brian Weinstein
Comment 9 2011-02-21 14:28:41 PST
Landed in r79252.
Alexey Proskuryakov
Comment 10 2011-02-22 14:24:23 PST
WebKitSystemInterface.h capitalizes names differently for the very reason of preventing directly using them. Please have a look at how all other WK exports work - you need to add them WebCore/WebCoreSystemInterface, and then to both WebKit1 and WebKit2 WebSystemInterface. Please fix it soon.
Alexey Proskuryakov
Comment 11 2011-02-22 14:32:36 PST
Brian explained that this WKSI use is not in WebCore, so what I said made no sense.
Alexey Proskuryakov
Comment 12 2011-02-22 15:45:18 PST
It's still strange that this is the only WKSI function that we ever used in cross-platform code in WebKit. Could this mean that this code should really be moved to WebCore? WebKit should ideally be nothing but a thin wrapper around WebCore.
Note You need to log in before you can comment on or make changes to this bug.